public class IgniteConfiguration extends Object
Ignition.start(IgniteConfiguration)
method. It defines all configuration
parameters required to start a grid instance. Usually, a special
class called "loader" will create an instance of this interface and apply
Ignition.start(IgniteConfiguration)
method to initialize Ignite instance.
Note that you should only set values that differ from defaults, as grid will automatically pick default values for all values that are not set.
For more information about grid configuration and startup refer to Ignition
documentation.
Modifier and Type | Field and Description |
---|---|
static int |
AVAILABLE_PROC_CNT
Default core size of public thread pool.
|
static String |
COURTESY_LOGGER_NAME
Courtesy notice log category.
|
static boolean |
DFLT_ALL_SEG_RESOLVERS_PASS_REQ
Default value for all segmentation resolvers pass required.
|
static boolean |
DFLT_CACHE_SANITY_CHECK_ENABLED
Default value for cache sanity check enabled flag.
|
static int |
DFLT_CLOCK_SYNC_FREQUENCY
Default clock synchronization frequency.
|
static int |
DFLT_CLOCK_SYNC_SAMPLES
Default number of clock sync samples.
|
static DeploymentMode |
DFLT_DEPLOYMENT_MODE
Default deployment mode (value is
DeploymentMode.SHARED ). |
static long |
DFLT_DISCOVERY_STARTUP_DELAY
Default discovery startup delay in milliseconds (value is
60,000ms ). |
static boolean |
DFLT_MARSHAL_LOCAL_JOBS
Default marshal local jobs flag.
|
static long |
DFLT_METRICS_EXPIRE_TIME
Default metrics expire time.
|
static int |
DFLT_METRICS_HISTORY_SIZE
Default metrics history size (value is
10000 ). |
static long |
DFLT_METRICS_LOG_FREQ
Default frequency of metrics log print out.
|
static long |
DFLT_METRICS_UPDATE_FREQ
Default metrics update frequency.
|
static int |
DFLT_MGMT_THREAD_CNT
Default size of management thread pool.
|
static long |
DFLT_NETWORK_TIMEOUT
Default maximum timeout to wait for network responses in milliseconds (value is
5,000ms ). |
static boolean |
DFLT_P2P_ENABLED
Default flag for peer class loading.
|
static int |
DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE
Default cache size for missed resources.
|
static int |
DFLT_P2P_THREAD_CNT
Default size of peer class loading thread pool.
|
static long |
DFLT_PUBLIC_KEEP_ALIVE_TIME
Default keep alive time for public thread pool.
|
static int |
DFLT_PUBLIC_THREAD_CNT
Default core size of public thread pool.
|
static int |
DFLT_PUBLIC_THREADPOOL_QUEUE_CAP
Default max queue capacity of public thread pool.
|
static long |
DFLT_SEG_CHK_FREQ
Default segment check frequency in discovery manager.
|
static GridSegmentationPolicy |
DFLT_SEG_PLC
Default segmentation policy.
|
static int |
DFLT_SEG_RESOLVE_ATTEMPTS
Default value segmentation resolve attempts count.
|
static int |
DFLT_SEND_RETRY_CNT
Default message send retries count.
|
static long |
DFLT_SEND_RETRY_DELAY
Default interval between message send retries.
|
static int |
DFLT_SYSTEM_CORE_THREAD_CNT
Default size of system thread pool.
|
static long |
DFLT_SYSTEM_KEEP_ALIVE_TIME
Default keep alive time for system thread pool.
|
static int |
DFLT_SYSTEM_MAX_THREAD_CNT
Default max size of system thread pool.
|
static int |
DFLT_SYSTEM_THREADPOOL_QUEUE_CAP
Default max queue capacity of system thread pool.
|
static int |
DFLT_TCP_PORT
Default TCP server port.
|
static int |
DFLT_TIME_SERVER_PORT_BASE
Default time server port base.
|
static int |
DFLT_TIME_SERVER_PORT_RANGE
Default time server port range.
|
static boolean |
DFLT_WAIT_FOR_SEG_ON_START
Default value for wait for segment on startup flag.
|
Constructor and Description |
---|
IgniteConfiguration()
Creates valid grid configuration with all default values.
|
IgniteConfiguration(IgniteConfiguration cfg)
Creates grid configuration by coping all configuration properties from
given configuration.
|
Modifier and Type | Method and Description |
---|---|
AddressResolver |
getAddressResolver()
Gets address resolver for addresses mapping determination.
|
AtomicConfiguration |
getAtomicConfiguration() |
CacheConfiguration[] |
getCacheConfiguration()
Gets configuration (descriptors) for all caches.
|
CheckpointSpi[] |
getCheckpointSpi()
Should return fully configured checkpoint SPI implementation.
|
ClassLoader |
getClassLoader() |
long |
getClockSyncFrequency()
Gets frequency at which clock is synchronized between nodes, in milliseconds.
|
int |
getClockSyncSamples()
Gets number of samples used to synchronize clocks between different nodes.
|
CollisionSpi |
getCollisionSpi()
Should return fully configured collision SPI implementation.
|
CommunicationSpi |
getCommunicationSpi()
Should return fully configured SPI communication implementation.
|
ConnectorConfiguration |
getConnectorConfiguration() |
DeploymentMode |
getDeploymentMode()
Gets deployment mode for deploying tasks and other classes on this node.
|
DeploymentSpi |
getDeploymentSpi()
Should return fully configured deployment SPI implementation.
|
DiscoverySpi |
getDiscoverySpi()
Should return fully configured discovery SPI implementation.
|
long |
getDiscoveryStartupDelay()
This value is used to expire messages from waiting list whenever node
discovery discrepancies happen.
|
EventStorageSpi |
getEventStorageSpi()
Should return fully configured event SPI implementation.
|
FailoverSpi[] |
getFailoverSpi()
Should return fully configured failover SPI implementation.
|
FileSystemConfiguration[] |
getFileSystemConfiguration()
Gets IGFS (Ignite In-Memory File System) configurations.
|
IgniteLogger |
getGridLogger()
Should return an instance of logger to use in grid.
|
String |
getGridName()
Gets optional grid name.
|
HadoopConfiguration |
getHadoopConfiguration()
Gets hadoop configuration.
|
int |
getIgfsThreadPoolSize()
Size of thread pool that is in charge of processing outgoing IGFS messages.
|
String |
getIgniteHome()
Should return Ignite installation home folder.
|
int[] |
getIncludeEventTypes()
Gets array of event types, which will be recorded.
|
String[] |
getIncludeProperties()
Gets array of system or environment properties to include into node attributes.
|
IndexingSpi |
getIndexingSpi()
Should return fully configured indexing SPI implementations.
|
LifecycleBean[] |
getLifecycleBeans()
Returns a collection of life-cycle beans.
|
LoadBalancingSpi[] |
getLoadBalancingSpi()
Should return fully configured load balancing SPI implementation.
|
Map<IgnitePredicate<? extends Event>,int[]> |
getLocalEventListeners()
Gets map of pre-configured local event listeners.
|
String |
getLocalHost()
Gets system-wide local address or host for all Ignite components to bind to.
|
int |
getManagementThreadPoolSize()
Size of thread pool that is in charge of processing internal and Visor
GridJobs . |
Marshaller |
getMarshaller()
Should return an instance of marshaller to use in grid.
|
MBeanServer |
getMBeanServer()
Should return MBean server instance.
|
long |
getMetricsExpireTime()
Elapsed time in milliseconds after which node metrics are considered expired.
|
int |
getMetricsHistorySize()
Number of node metrics to keep in memory to calculate totals and averages.
|
long |
getMetricsLogFrequency()
Gets frequency of metrics log print out.
|
long |
getMetricsUpdateFrequency()
Gets job metrics update frequency in milliseconds.
|
NearCacheConfiguration[] |
getNearCacheConfiguration()
Gets configuration (descriptors) for all near caches.
|
int |
getNetworkSendRetryCount()
Message send retries count.
|
long |
getNetworkSendRetryDelay()
Interval in milliseconds between message send retries.
|
long |
getNetworkTimeout()
Maximum timeout in milliseconds for network requests.
|
UUID |
getNodeId()
Unique identifier for this node within grid.
|
String[] |
getPeerClassLoadingLocalClassPathExclude()
Should return list of packages from the system classpath that need to
be peer-to-peer loaded from task originating node.
'*' is supported at the end of the package name which means
that all sub-packages and their classes are included like in Java
package import clause.
|
int |
getPeerClassLoadingMissedResourcesCacheSize()
Returns missed resources cache size.
|
int |
getPeerClassLoadingThreadPoolSize()
Size of thread pool which is in charge of peer class loading requests/responses.
|
PluginConfiguration[] |
getPluginConfigurations() |
int |
getPublicThreadPoolSize()
Should return a thread pool size to be used in grid.
|
GridSegmentationPolicy |
getSegmentationPolicy()
Returns segmentation policy.
|
int |
getSegmentationResolveAttempts()
Gets segmentation resolve attempts.
|
GridSegmentationResolver[] |
getSegmentationResolvers()
Returns a collection of segmentation resolvers.
|
long |
getSegmentCheckFrequency()
Returns frequency of network segment check by discovery manager.
|
ServiceConfiguration[] |
getServiceConfiguration()
Gets configurations for services to be deployed on the grid.
|
SwapSpaceSpi |
getSwapSpaceSpi()
Should return fully configured swap space SPI implementation.
|
int |
getSystemThreadPoolSize()
Size of thread pool that is in charge of processing internal system messages.
|
int |
getTimeServerPortBase()
Gets base UPD port number for grid time server.
|
int |
getTimeServerPortRange()
Defines port range to try for time server start.
|
TransactionConfiguration |
getTransactionConfiguration()
Gets transactions configuration.
|
Map<String,?> |
getUserAttributes()
Should return any user-defined attributes to be added to this node.
|
IgniteInClosure<IgniteConfiguration> |
getWarmupClosure()
Gets grid warmup closure.
|
String |
getWorkDirectory()
Gets Ignite work folder.
|
boolean |
isAllSegmentationResolversPassRequired()
Gets all segmentation resolvers pass required flag.
|
boolean |
isCacheSanityCheckEnabled()
Gets flag indicating whether cache sanity check is enabled.
|
Boolean |
isClientMode()
Gets client mode flag.
|
boolean |
isDaemon()
Whether or not this node should be a daemon node.
|
boolean |
isMarshalLocalJobs()
If this flag is set to
true , jobs mapped to local node will be
marshalled as if it was remote node. |
boolean |
isPeerClassLoadingEnabled()
Returns
true if peer class loading is enabled, false
otherwise. |
boolean |
isWaitForSegmentOnStart()
Gets wait for segment on startup flag.
|
void |
setAddressResolver(AddressResolver addrRslvr)
Sets address resolver for addresses mapping determination.
|
void |
setAllSegmentationResolversPassRequired(boolean allResolversPassReq)
Sets all segmentation resolvers pass required flag.
|
void |
setAtomicConfiguration(AtomicConfiguration atomicCfg) |
void |
setCacheConfiguration(CacheConfiguration... cacheCfg)
Sets cache configurations.
|
void |
setCacheSanityCheckEnabled(boolean cacheSanityCheckEnabled)
Sets cache sanity check flag.
|
void |
setCheckpointSpi(CheckpointSpi... cpSpi)
Sets fully configured instance of
CheckpointSpi . |
void |
setClassLoader(ClassLoader classLdr)
Sets loader which will be used for instantiating execution context (
EntryProcessors ,
CacheEntryListeners , CacheLoaders and
ExpiryPolicys ). |
void |
setClientMode(boolean clientMode)
Sets client mode flag.
|
void |
setClockSyncFrequency(long clockSyncFreq)
Sets clock synchronization frequency in milliseconds.
|
void |
setClockSyncSamples(int clockSyncSamples)
Sets number of samples used for clock synchronization.
|
void |
setCollisionSpi(CollisionSpi colSpi)
Sets fully configured instance of
CollisionSpi . |
void |
setCommunicationSpi(CommunicationSpi commSpi)
Sets fully configured instance of
CommunicationSpi . |
void |
setConnectorConfiguration(ConnectorConfiguration connectorCfg) |
void |
setDaemon(boolean daemon)
Sets daemon flag.
|
void |
setDeploymentMode(DeploymentMode deployMode)
Sets task classes and resources sharing mode.
|
void |
setDeploymentSpi(DeploymentSpi deploySpi)
Sets fully configured instance of
DeploymentSpi . |
void |
setDiscoverySpi(DiscoverySpi discoSpi)
Sets fully configured instance of
DiscoverySpi . |
void |
setDiscoveryStartupDelay(long discoStartupDelay)
Sets time in milliseconds after which a certain metric value is considered expired.
|
void |
setEventStorageSpi(EventStorageSpi evtSpi)
Sets fully configured instance of
EventStorageSpi . |
void |
setFailoverSpi(FailoverSpi... failSpi)
Sets fully configured instance of
FailoverSpi . |
void |
setFileSystemConfiguration(FileSystemConfiguration... igfsCfg)
Sets IGFS (Ignite In-Memory File System) configurations.
|
void |
setGridLogger(IgniteLogger log)
Sets logger to use within grid.
|
void |
setGridName(String gridName)
Sets grid name.
|
void |
setHadoopConfiguration(HadoopConfiguration hadoopCfg)
Sets hadoop configuration.
|
void |
setIgfsThreadPoolSize(int poolSize)
Set thread pool size that will be used to process outgoing IGFS messages.
|
void |
setIgniteHome(String ggHome)
Sets Ignite installation folder.
|
void |
setIncludeEventTypes(int... inclEvtTypes)
Sets array of event types, which will be recorded by
GridEventStorageManager.record(Event) . |
void |
setIncludeProperties(String... includeProps)
Sets array of system or environment property names to include into node attributes.
|
void |
setIndexingSpi(IndexingSpi indexingSpi)
Sets fully configured instances of
IndexingSpi . |
void |
setLifecycleBeans(LifecycleBean... lifecycleBeans)
Sets a collection of lifecycle beans.
|
void |
setLoadBalancingSpi(LoadBalancingSpi... loadBalancingSpi)
Sets fully configured instance of
LoadBalancingSpi . |
void |
setLocalEventListeners(Map<IgnitePredicate<? extends Event>,int[]> lsnrs)
Sets map of pre-configured local event listeners.
|
void |
setLocalHost(String locHost)
Sets system-wide local address or host for all Ignite components to bind to.
|
void |
setManagementThreadPoolSize(int poolSize)
Sets management thread pool size to use within grid.
|
void |
setMarshaller(Marshaller marsh)
Sets marshaller to use within grid.
|
void |
setMarshalLocalJobs(boolean marshLocJobs)
Sets marshal local jobs flag.
|
void |
setMBeanServer(MBeanServer mbeanSrv)
Sets initialized and started MBean server.
|
void |
setMetricsExpireTime(long metricsExpTime)
Sets time in milliseconds after which a certain metric value is considered expired.
|
void |
setMetricsHistorySize(int metricsHistSize)
Sets number of metrics kept in history to compute totals and averages.
|
void |
setMetricsLogFrequency(long metricsLogFreq)
Sets frequency of metrics log print out.
|
void |
setMetricsUpdateFrequency(long metricsUpdateFreq)
Sets job metrics update frequency in milliseconds.
|
void |
setNearCacheConfiguration(NearCacheConfiguration... nearCacheCfg)
Sets configuration for all near caches.
|
void |
setNetworkSendRetryCount(int sndRetryCnt)
Sets message send retries count.
|
void |
setNetworkSendRetryDelay(long sndRetryDelay)
Sets interval in milliseconds between message send retries.
|
void |
setNetworkTimeout(long netTimeout)
Maximum timeout in milliseconds for network requests.
|
void |
setNodeId(UUID nodeId)
Sets unique identifier for local node.
|
void |
setPeerClassLoadingEnabled(boolean p2pEnabled)
Enables/disables peer class loading.
|
void |
setPeerClassLoadingLocalClassPathExclude(String... p2pLocClsPathExcl)
Sets list of packages in a system class path that should be P2P
loaded even if they exist locally.
|
void |
setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize)
Sets size of missed resources cache.
|
void |
setPeerClassLoadingThreadPoolSize(int poolSize)
Sets thread pool size to use for peer class loading.
|
void |
setPluginConfigurations(PluginConfiguration... pluginCfgs) |
void |
setPublicThreadPoolSize(int poolSize)
Sets thread pool size to use within grid.
|
void |
setSegmentationPolicy(GridSegmentationPolicy segPlc)
Sets segmentation policy.
|
void |
setSegmentationResolveAttempts(int segResolveAttempts)
Sets segmentation resolve attempts count.
|
void |
setSegmentationResolvers(GridSegmentationResolver... segResolvers)
Sets segmentation resolvers.
|
void |
setSegmentCheckFrequency(long segChkFreq)
Sets network segment check frequency.
|
void |
setServiceConfiguration(ServiceConfiguration... svcCfgs)
Sets configurations for services to be deployed on the grid.
|
void |
setSwapSpaceSpi(SwapSpaceSpi swapSpaceSpi)
Sets fully configured instances of
SwapSpaceSpi . |
void |
setSystemThreadPoolSize(int poolSize)
Sets system thread pool size to use within grid.
|
void |
setTimeServerPortBase(int timeSrvPortBase)
Sets time server port base.
|
void |
setTimeServerPortRange(int timeSrvPortRange)
Sets time server port range.
|
void |
setTransactionConfiguration(TransactionConfiguration txCfg)
Sets transactions configuration.
|
void |
setUserAttributes(Map<String,?> userAttrs)
Sets user attributes for this node.
|
void |
setWaitForSegmentOnStart(boolean waitForSegOnStart)
Sets wait for segment on start flag.
|
void |
setWarmupClosure(IgniteInClosure<IgniteConfiguration> warmupClos)
Sets warmup closure to execute before grid startup.
|
void |
setWorkDirectory(String ggWork)
Sets Ignite work folder.
|
String |
toString() |
public static final String COURTESY_LOGGER_NAME
public static final boolean DFLT_P2P_ENABLED
false
which means that peer class loading is disabled.public static final int DFLT_METRICS_HISTORY_SIZE
10000
).public static final long DFLT_METRICS_UPDATE_FREQ
public static final long DFLT_METRICS_EXPIRE_TIME
Long.MAX_VALUE
which
means that metrics never expire.public static final long DFLT_NETWORK_TIMEOUT
5,000ms
).public static final long DFLT_SEND_RETRY_DELAY
public static final int DFLT_SEND_RETRY_CNT
public static final int DFLT_CLOCK_SYNC_SAMPLES
public static final int DFLT_CLOCK_SYNC_FREQUENCY
public static final long DFLT_DISCOVERY_STARTUP_DELAY
60,000ms
).public static final DeploymentMode DFLT_DEPLOYMENT_MODE
DeploymentMode.SHARED
).public static final int DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE
public static final int DFLT_TIME_SERVER_PORT_BASE
public static final int DFLT_TIME_SERVER_PORT_RANGE
public static final int AVAILABLE_PROC_CNT
public static final int DFLT_PUBLIC_THREAD_CNT
public static final long DFLT_PUBLIC_KEEP_ALIVE_TIME
public static final int DFLT_PUBLIC_THREADPOOL_QUEUE_CAP
public static final int DFLT_SYSTEM_CORE_THREAD_CNT
public static final int DFLT_SYSTEM_MAX_THREAD_CNT
public static final long DFLT_SYSTEM_KEEP_ALIVE_TIME
public static final int DFLT_SYSTEM_THREADPOOL_QUEUE_CAP
public static final int DFLT_P2P_THREAD_CNT
public static final int DFLT_MGMT_THREAD_CNT
public static final GridSegmentationPolicy DFLT_SEG_PLC
public static final boolean DFLT_WAIT_FOR_SEG_ON_START
public static final boolean DFLT_ALL_SEG_RESOLVERS_PASS_REQ
public static final int DFLT_SEG_RESOLVE_ATTEMPTS
public static final long DFLT_SEG_CHK_FREQ
public static final long DFLT_METRICS_LOG_FREQ
public static final int DFLT_TCP_PORT
public static final boolean DFLT_MARSHAL_LOCAL_JOBS
public static final boolean DFLT_CACHE_SANITY_CHECK_ENABLED
public IgniteConfiguration()
public IgniteConfiguration(IgniteConfiguration cfg)
cfg
- Grid configuration to copy from.public String getGridName()
null
if non-default grid name was not
provided.null
, which is default grid name, if
non-default grid name was not provided.public boolean isDaemon()
Daemon nodes are the usual grid nodes that participate in topology but not
visible on the main APIs, i.e. they are not part of any cluster groups. The only
way to see daemon nodes is to use ClusterGroup.forDaemons()
method.
Daemon nodes are used primarily for management and monitoring functionality that is build on Ignite and needs to participate in the topology, but also needs to be excluded from the "normal" topology, so that it won't participate in the task execution or in-memory data grid storage.
True
if this node should be a daemon node, false
otherwise.ClusterGroup.forDaemons()
public void setDaemon(boolean daemon)
Daemon nodes are the usual grid nodes that participate in topology but not
visible on the main APIs, i.e. they are not part of any cluster group. The only
way to see daemon nodes is to use ClusterGroup.forDaemons()
method.
Daemon nodes are used primarily for management and monitoring functionality that is build on Ignite and needs to participate in the topology, but also needs to be excluded from the "normal" topology, so that it won't participate in the task execution or in-memory data grid storage.
daemon
- Daemon flag.public void setGridName(String gridName)
null
is a default grid name.gridName
- Grid name to set. Can be null
, which is default
grid name.public Map<String,?> getUserAttributes()
ClusterNode.attribute(String)
or
ClusterNode.attributes()
methods.
Note that system adds the following (among others) attributes automatically:
{@link System#getProperties()}
- All system properties.{@link System#getenv(String)}
- All environment properties.Note that grid will add all System properties and environment properties to grid node attributes also. SPIs may also add node attributes that are used for SPI implementation.
NOTE: attributes names starting with org.apache.ignite
are reserved
for internal use.
public void setUserAttributes(Map<String,?> userAttrs)
userAttrs
- User attributes for this node.getUserAttributes()
public IgniteLogger getGridLogger()
Log4JLogger
will be used.public void setGridLogger(IgniteLogger log)
log
- Logger to use within grid.getGridLogger()
public int getPublicThreadPoolSize()
GridJobs
and user messages sent to node.
If not provided, executor service will have size DFLT_PUBLIC_THREAD_CNT
.
public int getSystemThreadPoolSize()
If not provided, executor service will have size DFLT_SYSTEM_CORE_THREAD_CNT
.
public int getManagementThreadPoolSize()
GridJobs
.
If not provided, executor service will have size DFLT_MGMT_THREAD_CNT
public int getPeerClassLoadingThreadPoolSize()
1
.
If not provided, executor service will have size DFLT_P2P_THREAD_CNT
.
public int getIgfsThreadPoolSize()
If not provided, executor service will have size equals number of processors available in system.
public void setPublicThreadPoolSize(int poolSize)
poolSize
- Thread pool size to use within grid.getPublicThreadPoolSize()
public void setSystemThreadPoolSize(int poolSize)
poolSize
- Thread pool size to use within grid.getSystemThreadPoolSize()
public void setManagementThreadPoolSize(int poolSize)
poolSize
- Thread pool size to use within grid.getManagementThreadPoolSize()
public void setPeerClassLoadingThreadPoolSize(int poolSize)
poolSize
- Thread pool size to use within grid.getPeerClassLoadingThreadPoolSize()
public void setIgfsThreadPoolSize(int poolSize)
poolSize
- Executor service to use for outgoing IGFS messages.getIgfsThreadPoolSize()
public String getIgniteHome()
IGNITE_HOME
system property and environment variable in that order. If
IGNITE_HOME
still could not be obtained, then grid will not start and exception
will be thrown.null
to make the system attempt to
infer it automatically.IgniteSystemProperties.IGNITE_HOME
public void setIgniteHome(String ggHome)
ggHome
- Ignition
installation folder.getIgniteHome()
,
IgniteSystemProperties.IGNITE_HOME
public String getWorkDirectory()
IGNITE_HOME
specified by setIgniteHome(String)
or
IGNITE_HOME
environment variable or system property.
If IGNITE_HOME
is not provided, then system temp folder is used.
null
to make the system attempt to infer it automatically.getIgniteHome()
,
IgniteSystemProperties.IGNITE_HOME
public void setWorkDirectory(String ggWork)
ggWork
- Ignite
work folder.getWorkDirectory()
public MBeanServer getMBeanServer()
null
to make the system create a default one.ManagementFactory.getPlatformMBeanServer()
public void setMBeanServer(MBeanServer mbeanSrv)
mbeanSrv
- Initialized and started MBean server.public UUID getNodeId()
public void setNodeId(UUID nodeId)
nodeId
- Unique identifier for local node.getNodeId()
public Marshaller getMarshaller()
OptimizedMarshaller
will be used on Java HotSpot VM, and
JdkMarshaller
will be used on other VMs.public void setMarshaller(Marshaller marsh)
marsh
- Marshaller to use within grid.getMarshaller()
public boolean isPeerClassLoadingEnabled()
true
if peer class loading is enabled, false
otherwise. Default value is false
specified by DFLT_P2P_ENABLED
.
When peer class loading is enabled and task is not deployed on local node, local node will try to load classes from the node that initiated task execution. This way, a task can be physically deployed only on one node and then internally penetrate to all other nodes.
See ComputeTask
documentation for more information about task deployment.
true
if peer class loading is enabled, false
otherwise.public boolean isMarshalLocalJobs()
true
, jobs mapped to local node will be
marshalled as if it was remote node.
If not provided, default value is defined by DFLT_MARSHAL_LOCAL_JOBS
.
True
if local jobs should be marshalled.public void setMarshalLocalJobs(boolean marshLocJobs)
marshLocJobs
- True
if local jobs should be marshalled.public void setPeerClassLoadingEnabled(boolean p2pEnabled)
p2pEnabled
- true
if peer class loading is
enabled, false
otherwise.public String[] getPeerClassLoadingLocalClassPathExclude()
public void setPeerClassLoadingLocalClassPathExclude(String... p2pLocClsPathExcl)
p2pLocClsPathExcl
- List of P2P loaded packages. Package
name supports '*' at the end like in package import clause.public int getMetricsHistorySize()
0
), then default value
DFLT_METRICS_HISTORY_SIZE
is used.DFLT_METRICS_HISTORY_SIZE
public void setMetricsHistorySize(int metricsHistSize)
10,000
.metricsHistSize
- Number of metrics kept in history to use for
metric totals and averages calculations.DFLT_METRICS_HISTORY_SIZE
public long getMetricsUpdateFrequency()
Updating metrics too frequently may have negative performance impact.
The following values are accepted:
-1
job metrics are never updated.0
job metrics are updated on each job start and finish.DFLT_METRICS_UPDATE_FREQ
is used.DFLT_METRICS_UPDATE_FREQ
is used.DFLT_METRICS_UPDATE_FREQ
public void setMetricsUpdateFrequency(long metricsUpdateFreq)
If set to -1
job metrics are never updated.
If set to 0
job metrics are updated on each job start and finish.
Positive value defines the actual update frequency.
If not provided, then default value
DFLT_METRICS_UPDATE_FREQ
is used.
metricsUpdateFreq
- Job metrics update frequency in milliseconds.public long getMetricsExpireTime()
DFLT_METRICS_EXPIRE_TIME
is used.DFLT_METRICS_EXPIRE_TIME
public void setMetricsExpireTime(long metricsExpTime)
600,000
milliseconds (10 minutes).metricsExpTime
- The metricsExpTime to set.DFLT_METRICS_EXPIRE_TIME
public long getNetworkTimeout()
If not provided, then default value
DFLT_NETWORK_TIMEOUT
is used.
DFLT_NETWORK_TIMEOUT
public void setNetworkTimeout(long netTimeout)
If not provided (value is 0
), then default value
DFLT_NETWORK_TIMEOUT
is used.
netTimeout
- Maximum timeout for network requests.DFLT_NETWORK_TIMEOUT
public long getNetworkSendRetryDelay()
If not provided, then default value
DFLT_SEND_RETRY_DELAY
is used.
getNetworkSendRetryCount()
,
DFLT_SEND_RETRY_DELAY
public void setNetworkSendRetryDelay(long sndRetryDelay)
If not provided, then default value
DFLT_SEND_RETRY_DELAY
is used.
sndRetryDelay
- Interval between message send retries.public int getNetworkSendRetryCount()
If not provided, then default value
DFLT_SEND_RETRY_CNT
is used.
getNetworkSendRetryDelay()
,
DFLT_SEND_RETRY_CNT
public void setNetworkSendRetryCount(int sndRetryCnt)
If not provided, then default value
DFLT_SEND_RETRY_CNT
is used.
sndRetryCnt
- Message send retries count.public int getClockSyncSamples()
Clock synchronization is used for cache version assignment in CLOCK
order mode.
public void setClockSyncSamples(int clockSyncSamples)
clockSyncSamples
- Number of samples.public long getClockSyncFrequency()
Clock synchronization is used for cache version assignment in CLOCK
order mode.
public void setClockSyncFrequency(long clockSyncFreq)
clockSyncFreq
- Clock synchronization frequency.public LifecycleBean[] getLifecycleBeans()
LifecycleBean
,
LifecycleEventType
public void setLifecycleBeans(LifecycleBean... lifecycleBeans)
lifecycleBeans
- Collection of lifecycle beans.LifecycleEventType
public EventStorageSpi getEventStorageSpi()
MemoryEventStorageSpi
will be used.null
to use default implementation.public void setEventStorageSpi(EventStorageSpi evtSpi)
EventStorageSpi
.evtSpi
- Fully configured instance of EventStorageSpi
.getEventStorageSpi()
public DiscoverySpi getDiscoverySpi()
TcpDiscoverySpi
will be used by default.null
to use default implementation.public void setDiscoverySpi(DiscoverySpi discoSpi)
DiscoverySpi
.discoSpi
- Fully configured instance of DiscoverySpi
.getDiscoverySpi()
public GridSegmentationPolicy getSegmentationPolicy()
DFLT_SEG_PLC
.public void setSegmentationPolicy(GridSegmentationPolicy segPlc)
segPlc
- Segmentation policy.public boolean isWaitForSegmentOnStart()
DFLT_WAIT_FOR_SEG_ON_START
.
Returns true
if node should wait for correct segment on start.
If node detects that segment is incorrect on startup and this method
returns true
, node waits until segment becomes correct.
If segment is incorrect on startup and this method returns false
,
exception is thrown.
True
to wait for segment on startup, false
otherwise.public void setWaitForSegmentOnStart(boolean waitForSegOnStart)
waitForSegOnStart
- True
to wait for segment on start.public boolean isAllSegmentationResolversPassRequired()
Returns true
if all segmentation resolvers should succeed
for node to be in correct segment.
Returns false
if at least one segmentation resolver should succeed
for node to be in correct segment.
Default is DFLT_ALL_SEG_RESOLVERS_PASS_REQ
.
True
if all segmentation resolvers should succeed,
false
if only one is enough.public void setAllSegmentationResolversPassRequired(boolean allResolversPassReq)
allResolversPassReq
- True
if all segmentation resolvers should
succeed for node to be in the correct segment.public int getSegmentationResolveAttempts()
DFLT_SEG_RESOLVE_ATTEMPTS
.public void setSegmentationResolveAttempts(int segResolveAttempts)
segResolveAttempts
- Segmentation resolve attempts.public GridSegmentationResolver[] getSegmentationResolvers()
If array is null
or empty, periodical and on-start network
segment checks do not happen.
public void setSegmentationResolvers(GridSegmentationResolver... segResolvers)
segResolvers
- Segmentation resolvers.public long getSegmentCheckFrequency()
if 0, periodic segment check is disabled and segment is checked only on topology changes (if segmentation resolvers are configured).
Default is DFLT_SEG_CHK_FREQ
.
public void setSegmentCheckFrequency(long segChkFreq)
segChkFreq
- Segment check frequency.public CommunicationSpi getCommunicationSpi()
TcpCommunicationSpi
will be used by default.null
to use default implementation.public void setCommunicationSpi(CommunicationSpi commSpi)
CommunicationSpi
.commSpi
- Fully configured instance of CommunicationSpi
.getCommunicationSpi()
public CollisionSpi getCollisionSpi()
NoopCollisionSpi
is used and jobs get activated immediately
on arrive to mapped node. This approach suits well for large amount of small
jobs (which is a wide-spread use case). User still can control the number
of concurrent jobs by setting maximum thread pool size defined by
GridConfiguration.getPublicThreadPoolSize() configuration property.null
to use default implementation.public void setCollisionSpi(CollisionSpi colSpi)
CollisionSpi
.colSpi
- Fully configured instance of CollisionSpi
or
null
if no SPI provided.getCollisionSpi()
public DeploymentSpi getDeploymentSpi()
LocalDeploymentSpi
will be used.null
to use default implementation.public void setDeploymentSpi(DeploymentSpi deploySpi)
DeploymentSpi
.deploySpi
- Fully configured instance of DeploymentSpi
.getDeploymentSpi()
public CheckpointSpi[] getCheckpointSpi()
NoopCheckpointSpi
will be used.null
to use default implementation.public void setCheckpointSpi(CheckpointSpi... cpSpi)
CheckpointSpi
.cpSpi
- Fully configured instance of CheckpointSpi
.getCheckpointSpi()
public FailoverSpi[] getFailoverSpi()
AlwaysFailoverSpi
will be used.null
to use default implementation.public void setFailoverSpi(FailoverSpi... failSpi)
FailoverSpi
.failSpi
- Fully configured instance of FailoverSpi
or
null
if no SPI provided.getFailoverSpi()
public LoadBalancingSpi[] getLoadBalancingSpi()
RoundRobinLoadBalancingSpi
will be used.null
to use default implementation.public long getDiscoveryStartupDelay()
During startup, it is possible for some SPIs to have a small time window when Node A has discovered Node B, but Node B has not discovered Node A yet. Such time window is usually very small, a matter of milliseconds, but certain JMS providers, for example, may be very slow and hence have larger discovery delay window.
The default value of this property is 60,000
specified by
DFLT_DISCOVERY_STARTUP_DELAY
. This should be good enough for vast
majority of configurations. However, if you do anticipate an even larger
delay, you should increase this value.
public void setDiscoveryStartupDelay(long discoStartupDelay)
600,000
milliseconds (10 minutes).discoStartupDelay
- Time in milliseconds for when nodes
can be out-of-sync during startup.public void setLoadBalancingSpi(LoadBalancingSpi... loadBalancingSpi)
LoadBalancingSpi
.loadBalancingSpi
- Fully configured instance of LoadBalancingSpi
or
null
if no SPI provided.getLoadBalancingSpi()
public void setSwapSpaceSpi(SwapSpaceSpi swapSpaceSpi)
SwapSpaceSpi
.swapSpaceSpi
- Fully configured instances of SwapSpaceSpi
or
null if no SPI provided.getSwapSpaceSpi()
public SwapSpaceSpi getSwapSpaceSpi()
FileSwapSpaceSpi
will be used.
Note that user can provide one or multiple instances of this SPI (and select later which one is used in a particular context).
public void setIndexingSpi(IndexingSpi indexingSpi)
IndexingSpi
.indexingSpi
- Fully configured instance of IndexingSpi
.getIndexingSpi()
public IndexingSpi getIndexingSpi()
public AddressResolver getAddressResolver()
public void setAddressResolver(AddressResolver addrRslvr)
addrRslvr
- Address resolver.public void setDeploymentMode(DeploymentMode deployMode)
deployMode
- Task classes and resources sharing mode.public DeploymentMode getDeploymentMode()
DeploymentMode
documentation for more information.public void setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize)
p2pMissedCacheSize
- Size of missed resources cache.public int getPeerClassLoadingMissedResourcesCacheSize()
0
, missed
resources will be cached and next resource request ignored. If size is 0
,
then request for the resource will be sent to the remote node every time this
resource is requested.public CacheConfiguration[] getCacheConfiguration()
public void setCacheConfiguration(CacheConfiguration... cacheCfg)
cacheCfg
- Cache configurations.public NearCacheConfiguration[] getNearCacheConfiguration()
public void setNearCacheConfiguration(NearCacheConfiguration... nearCacheCfg)
nearCacheCfg
- Near cache configurations.public Boolean isClientMode()
public void setClientMode(boolean clientMode)
clientMode
- Client mode flag.public boolean isCacheSanityCheckEnabled()
lock(...)
or lockAsync(...)
methods when entry is enlisted to transaction.These checks are not required for cache operation, but help to find subtle bugs. Disabling of this checks usually yields a noticeable performance gain.
If not provided, default value is DFLT_CACHE_SANITY_CHECK_ENABLED
.
True
if group lock sanity check is enabled.public void setCacheSanityCheckEnabled(boolean cacheSanityCheckEnabled)
cacheSanityCheckEnabled
- True
if cache sanity check is enabled.isCacheSanityCheckEnabled()
public int[] getIncludeEventTypes()
Note that by default all events in Ignite are disabled. Ignite can and often does generate thousands events per seconds under the load and therefore it creates a significant additional load on the system. If these events are not needed by the application this load is unnecessary and leads to significant performance degradation. So it is highly recommended to enable only those events that your application logic requires. Note that certain events are required for Ignite's internal operations and such events will still be generated but not stored by event storage SPI if they are disabled in Ignite configuration.
public void setIncludeEventTypes(int... inclEvtTypes)
GridEventStorageManager.record(Event)
.
Note, that either the include event types or the exclude event types can be established.inclEvtTypes
- Include event types.public void setLocalHost(String locHost)
locHost
- Local IP address or host to bind to.public String getLocalHost()
If null
then Ignite tries to use local wildcard address. That means that
all services will be available on all network interfaces of the host machine.
It is strongly recommended to set this parameter for all production environments.
If not provided, default is null
.
public int getTimeServerPortBase()
[timeServerPortBase, timeServerPortBase + timeServerPortRange - 1]
.
Time server provides clock synchronization between nodes.
public void setTimeServerPortBase(int timeSrvPortBase)
timeSrvPortBase
- Time server port base.public int getTimeServerPortRange()
public void setTimeServerPortRange(int timeSrvPortRange)
timeSrvPortRange
- Time server port range.public String[] getIncludeProperties()
null
, which is default, then all system and environment
properties will be included. If this array is empty, then none will be included.
Otherwise, for every name provided, first a system property will be looked up,
and then, if it is not found, environment property will be looked up.public void setIncludeProperties(String... includeProps)
getIncludeProperties()
for more info.includeProps
- Array of system or environment property names to include into node attributes.public long getMetricsLogFrequency()
If 0
, metrics print out is disabled.
If not provided, then default value DFLT_METRICS_LOG_FREQ
is used.
public void setMetricsLogFrequency(long metricsLogFreq)
If 0
, metrics print out is disabled.
If not provided, then default value DFLT_METRICS_LOG_FREQ
is used.
metricsLogFreq
- Frequency of metrics log print out.public FileSystemConfiguration[] getFileSystemConfiguration()
public void setFileSystemConfiguration(FileSystemConfiguration... igfsCfg)
igfsCfg
- IGFS configurations.public HadoopConfiguration getHadoopConfiguration()
public void setHadoopConfiguration(HadoopConfiguration hadoopCfg)
hadoopCfg
- Hadoop configuration.public ConnectorConfiguration getConnectorConfiguration()
public void setConnectorConfiguration(ConnectorConfiguration connectorCfg)
connectorCfg
- Connector configuration.public ServiceConfiguration[] getServiceConfiguration()
public void setServiceConfiguration(ServiceConfiguration... svcCfgs)
svcCfgs
- Configurations for services to be deployed on the grid.public Map<IgnitePredicate<? extends Event>,int[]> getLocalEventListeners()
EventType
public void setLocalEventListeners(Map<IgnitePredicate<? extends Event>,int[]> lsnrs)
lsnrs
- Pre-configured event listeners map.public IgniteInClosure<IgniteConfiguration> getWarmupClosure()
public void setWarmupClosure(IgniteInClosure<IgniteConfiguration> warmupClos)
warmupClos
- Warmup closure to execute.getWarmupClosure()
public TransactionConfiguration getTransactionConfiguration()
public void setTransactionConfiguration(TransactionConfiguration txCfg)
txCfg
- Transactions configuration.public PluginConfiguration[] getPluginConfigurations()
public void setPluginConfigurations(PluginConfiguration... pluginCfgs)
pluginCfgs
- Plugin configurations.public AtomicConfiguration getAtomicConfiguration()
public void setAtomicConfiguration(AtomicConfiguration atomicCfg)
atomicCfg
- Atomic data structures configuration.public void setClassLoader(ClassLoader classLdr)
EntryProcessors
,
CacheEntryListeners
, CacheLoaders
and
ExpiryPolicys
).classLdr
- Class loader.public ClassLoader getClassLoader()
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0 Release Date : March 31 2015