GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid
Interface GridConfiguration

All Known Implementing Classes:
GridConfigurationAdapter

public interface GridConfiguration

This interface defines grid runtime configuration. This configuration is passed to GridFactory.start(GridConfiguration) 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 GridFactory.start(GridConfiguration) method to initialize GridGain instance.

Note, that absolutely every configuration property in GridConfiguration is optional. One can simply create new instance of GridConfigurationAdapter, for example, and pass it to GridFactory.start(GridConfiguration) to start grid with default configuration. See GridFactory documentation for information about default configuration properties used and more information on how to start grid.

For more information about grid configuration and startup refer to GridFactory documentation which includes description and default values for every configuration property.

Wiki & Forum:


Wiki
Forum

 

Field Summary
static String COURTESY_LOGGER_NAME
          Coutesy notice log category.
static boolean DFLT_ALL_SEG_RESOLVERS_PASS_REQ
          Default value for all segmentation resolvers pass required.
static GridDeploymentMode DFLT_DEPLOYMENT_MODE
          Default deployment mode (value is GridDeploymentMode.SHARED).
static long DFLT_DISCOVERY_STARTUP_DELAY
          Default discovery startup delay in milliseconds (value is 60,000ms).
static long DFLT_METRICS_EXPIRE_TIME
          Default metrics expire time.
static int DFLT_METRICS_HISTORY_SIZE
          Default metrics history size (value is 10000).
static int DFLT_METRICS_LOG_FREQ
           
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 int DFLT_PUBLIC_THREAD_CNT
          Default size of public thread pool.
static int 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 String DFLT_SMTP_FROM_EMAIL
          Default FROM email address.
static int DFLT_SMTP_PORT
          Default SMTP port.
static boolean DFLT_SMTP_SSL
          Default SSL enabled flag.
static boolean DFLT_SMTP_STARTTLS
          Default STARTTLS enabled flag.
static int DFLT_SYSTEM_THREAD_CNT
          Default size of system thread pool.
static boolean DFLT_WAIT_FOR_SEG_ON_START
          Default value for wait for segment on startup flag.
 
Method Summary
 String[] getAdminEmails()
          Gets optional set of admin emails where email notifications will be set.
 GridCacheConfiguration[] getCacheConfiguration()
          Gets configuration (descriptors) for all caches.
 GridCheckpointSpi[] getCheckpointSpi()
          Should return fully configured checkpoint SPI implementation.
 GridCollisionSpi getCollisionSpi()
          Should return fully configured collision SPI implementation.
 GridCommunicationSpi getCommunicationSpi()
          Should return fully configured SPI communication implementation.
 GridDeploymentMode getDeploymentMode()
          Gets deployment mode for deploying tasks and other classes on this node.
 GridDeploymentSpi getDeploymentSpi()
          Should return fully configured deployment SPI implementation.
 GridDiscoverySpi 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.
 GridEventStorageSpi getEventStorageSpi()
          Should return fully configured event SPI implementation.
 int[] getExcludeEventTypes()
          Gets array of event types, which will not be recorded.
 ExecutorService getExecutorService()
          Should return an instance of fully configured thread pool to be used in grid.
 boolean getExecutorServiceShutdown()
          Shutdown flag for executor service.
 GridFailoverSpi[] getFailoverSpi()
          Should return fully configured failover SPI implementation.
 String getGridGainHome()
          Should return GridGain installation home folder.
 GridLogger getGridLogger()
          Should return an instance of logger to use in grid.
 String getGridName()
          Gets optional name of this grid instance.
 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.
 String getLicenseUrl()
          Gets custom license file URL to be used instead of default license file location.
 GridLifecycleBean[] getLifecycleBeans()
          Returns a collection of life-cycle beans.
 GridLoadBalancingSpi[] getLoadBalancingSpi()
          Should return fully configured load balancing SPI implementation.
 Map<GridLocalEventListener,int[]> getLocalEventListeners()
          Gets map of pre-configured local event listeners.
 String getLocalHost()
          Gets system-wide local address or host for all GridGain components to bind to.
 GridMarshaller 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.
 int getMetricsLogFrequency()
          Gets frequency of metrics log print out.
 GridLocalMetricsSpi getMetricsSpi()
          Should return fully configured metrics SPI implementation.
 long getNetworkTimeout()
          Maximum timeout in milliseconds for network requests.
 UUID getNodeId()
          Unique identifier for this node within grid.
 String[] getPeerClassLoadingClassPathExclude()
          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.
 ExecutorService getPeerClassLoadingExecutorService()
          Should return an instance of fully configured executor service which is in charge of peer class loading requests/responses.
 boolean getPeerClassLoadingExecutorServiceShutdown()
          Should return flag of peer class loading executor service shutdown when the grid stops.
 int getPeerClassLoadingMissedResourcesCacheSize()
          Returns missed resources cache size.
 String getRestJettyPath()
          Gets path, either absolute or relative to GRIDGAIN_HOME, to Jetty XML configuration file.
 String getRestSecretKey()
          Gets secret key to authenticate REST requests.
 GridSegmentationPolicy getSegmentationPolicy()
          Returns segmentation policy.
 int getSegmentationResolveAttempts()
          Gets segmentation resolve attempts.
 GridSegmentationResolver[] getSegmentationResolvers()
          Returns a collection of segmentation resolvers.
 int getSegmentCheckFrequency()
          Returns frequency of network segment check by discovery manager.
 String getSmtpFromEmail()
          Gets optional FROM email address for email notifications.
 String getSmtpHost()
          Gets SMTP host name or null if SMTP is not configured.
 String getSmtpPassword()
          SMTP password or null if not used.
 int getSmtpPort()
          Gets SMTP port.
 String getSmtpUsername()
          Gets SMTP username or null if not used.
 GridSwapSpaceSpi[] getSwapSpaceSpi()
          Should return fully configured swap space SPI implementations.
 ExecutorService getSystemExecutorService()
          Executor service that is in charge of processing GridTaskSession messages and job responses.
 boolean getSystemExecutorServiceShutdown()
          Shutdown flag for system executor service.
 GridTopologySpi[] getTopologySpi()
          Should return fully configured topology SPI implementation.
 Map<String,?> getUserAttributes()
          Should return any user-defined attributes to be added to this node.
 boolean isAllSegmentationResolversPassRequired()
          Gets all segmentation resolvers pass required flag.
 boolean isDaemon()
          Whether or not this node should be a daemon node.
 boolean isLifeCycleEmailNotification()
          Whether or not send email notifications on node start and stop.
 boolean isPeerClassLoadingEnabled()
          Returns true if peer class loading is enabled, false otherwise.
 boolean isRestEnabled()
          Gets flag indicating whether external REST access is enabled or not.
 boolean isSmtpSsl()
          Whether or not to use SSL fot SMTP.
 boolean isSmtpStartTls()
          Whether or not to use STARTTLS fot SMTP.
 boolean isWaitForSegmentOnStart()
          Gets wait for segment on startup flag.
 

Field Detail

COURTESY_LOGGER_NAME

static final String COURTESY_LOGGER_NAME
Coutesy notice log category.

See Also:
Constant Field Values

DFLT_P2P_ENABLED

static final boolean DFLT_P2P_ENABLED
Default flag for peer class loading. By default the value is true which means that peer class loading is enabled.

See Also:
Constant Field Values

DFLT_METRICS_HISTORY_SIZE

static final int DFLT_METRICS_HISTORY_SIZE
Default metrics history size (value is 10000).

See Also:
Constant Field Values

DFLT_METRICS_EXPIRE_TIME

static final long DFLT_METRICS_EXPIRE_TIME
Default metrics expire time. The value is Long.MAX_VALUE which means that metrics never expire.

See Also:
Constant Field Values

DFLT_NETWORK_TIMEOUT

static final long DFLT_NETWORK_TIMEOUT
Default maximum timeout to wait for network responses in milliseconds (value is 5,000ms).

See Also:
Constant Field Values

DFLT_DISCOVERY_STARTUP_DELAY

static final long DFLT_DISCOVERY_STARTUP_DELAY
Default discovery startup delay in milliseconds (value is 60,000ms).

See Also:
Constant Field Values

DFLT_DEPLOYMENT_MODE

static final GridDeploymentMode DFLT_DEPLOYMENT_MODE
Default deployment mode (value is GridDeploymentMode.SHARED).


DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE

static final int DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE
Default cache size for missed resources.

See Also:
Constant Field Values

DFLT_SMTP_PORT

static final int DFLT_SMTP_PORT
Default SMTP port.

See Also:
Constant Field Values

DFLT_SMTP_SSL

static final boolean DFLT_SMTP_SSL
Default SSL enabled flag.

See Also:
Constant Field Values

DFLT_SMTP_STARTTLS

static final boolean DFLT_SMTP_STARTTLS
Default STARTTLS enabled flag.

See Also:
Constant Field Values

DFLT_SMTP_FROM_EMAIL

static final String DFLT_SMTP_FROM_EMAIL
Default FROM email address.

See Also:
Constant Field Values

DFLT_PUBLIC_THREAD_CNT

static final int DFLT_PUBLIC_THREAD_CNT
Default size of public thread pool.

See Also:
Constant Field Values

DFLT_SYSTEM_THREAD_CNT

static final int DFLT_SYSTEM_THREAD_CNT
Default size of system thread pool.

See Also:
Constant Field Values

DFLT_P2P_THREAD_CNT

static final int DFLT_P2P_THREAD_CNT
Default size of peer class loading thread pool.

See Also:
Constant Field Values

DFLT_SEG_PLC

static final GridSegmentationPolicy DFLT_SEG_PLC
Default segmentation policy.


DFLT_WAIT_FOR_SEG_ON_START

static final boolean DFLT_WAIT_FOR_SEG_ON_START
Default value for wait for segment on startup flag.

See Also:
Constant Field Values

DFLT_ALL_SEG_RESOLVERS_PASS_REQ

static final boolean DFLT_ALL_SEG_RESOLVERS_PASS_REQ
Default value for all segmentation resolvers pass required.

See Also:
Constant Field Values

DFLT_SEG_RESOLVE_ATTEMPTS

static final int DFLT_SEG_RESOLVE_ATTEMPTS
Default value segmentation resolve attempts count.

See Also:
Constant Field Values

DFLT_SEG_CHK_FREQ

static final int DFLT_SEG_CHK_FREQ
Default segment check frequency in discovery manager.

See Also:
Constant Field Values

DFLT_METRICS_LOG_FREQ

static final int DFLT_METRICS_LOG_FREQ
See Also:
Constant Field Values
Method Detail

isLifeCycleEmailNotification

@GridEnterpriseFeature
boolean isLifeCycleEmailNotification()
Whether or not send email notifications on node start and stop. Note if enabled email notifications will only be sent if SMTP is configured and at least one admin email is provided.

By default - email notifications are enabled.

Note that life cycle notification is only available in Enterprise Edition. In Community Edition this property is ignored.

Returns:
True to enable lifecycle email notifications.
See Also:
GridConfiguration.getSmtpHost(), GridConfiguration.getAdminEmails()

getSmtpHost

@GridEnterpriseFeature
@Nullable
String getSmtpHost()
Gets SMTP host name or null if SMTP is not configured.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Note that getSmtpHost() is the only mandatory SMTP configuration property.

Returns:
SMTP host name or null if SMTP is not configured.
See Also:
GridSystemProperties.GG_SMTP_HOST

isSmtpSsl

@GridEnterpriseFeature
boolean isSmtpSsl()
Whether or not to use SSL fot SMTP. Default is GridConfiguration.DFLT_SMTP_SSL.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Note that GridConfiguration.getSmtpHost() is the only mandatory SMTP configuration property.

Returns:
Whether or not to use SSL fot SMTP.
See Also:
GridConfiguration.DFLT_SMTP_SSL, GridSystemProperties.GG_SMTP_SSL

isSmtpStartTls

@GridEnterpriseFeature
boolean isSmtpStartTls()
Whether or not to use STARTTLS fot SMTP. Default is GridConfiguration.DFLT_SMTP_STARTTLS.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Note that GridConfiguration.getSmtpHost() is the only mandatory SMTP configuration property.

Returns:
Whether or not to use STARTTLS fot SMTP.
See Also:
GridConfiguration.DFLT_SMTP_STARTTLS, GridSystemProperties.GG_SMTP_STARTTLS

getSmtpPort

@GridEnterpriseFeature
int getSmtpPort()
Gets SMTP port. Default value is GridConfiguration.DFLT_SMTP_PORT.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Note that GridConfiguration.getSmtpHost() is the only mandatory SMTP configuration property.

Returns:
SMTP port.
See Also:
GridConfiguration.DFLT_SMTP_PORT, GridSystemProperties.GG_SMTP_PORT

getSmtpUsername

@GridEnterpriseFeature
@Nullable
String getSmtpUsername()
Gets SMTP username or null if not used.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Note that GridConfiguration.getSmtpHost() is the only mandatory SMTP configuration property.

Returns:
SMTP username or null.
See Also:
GridSystemProperties.GG_SMTP_USERNAME

getSmtpPassword

@GridEnterpriseFeature
@Nullable
String getSmtpPassword()
SMTP password or null if not used.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Note that GridConfiguration.getSmtpHost() is the only mandatory SMTP configuration property.

Returns:
SMTP password or null.
See Also:
GridSystemProperties.GG_SMTP_PWD

getAdminEmails

@GridEnterpriseFeature
@Nullable
String[] getAdminEmails()
Gets optional set of admin emails where email notifications will be set.

Note that GridGain uses SMTP to send emails in critical situations such as license expiration or fatal system errors. It is highly recommended to configure SMTP in production environment.

Returns:
Optional set of admin emails where email notifications will be set. If null - emails will be sent only to the email in the license if one provided.
See Also:
GridSystemProperties.GG_ADMIN_EMAILS

getSmtpFromEmail

@GridEnterpriseFeature
@Nullable
String getSmtpFromEmail()
Gets optional FROM email address for email notifications. By default GridConfiguration.DFLT_SMTP_FROM_EMAIL will be used.

Returns:
Optional FROM email address for email notifications. If null - GridConfiguration.DFLT_SMTP_FROM_EMAIL will be used by default.
See Also:
GridConfiguration.DFLT_SMTP_FROM_EMAIL, GridSystemProperties.GG_SMTP_FROM

getGridName

String getGridName()
Gets optional name of this grid instance. If name is not provides, null will be used as a default name for the grid instance.

Returns:
Grid name. Can be null which is default if non-default name was not provided.

getUserAttributes

Map<String,?> getUserAttributes()
Should return any user-defined attributes to be added to this node. These attributes can then be accessed on nodes by calling GridNode.attribute(String) or GridNode.attributes() methods.

Note that system adds the following (among others) attributes automatically:

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.gridgain are reserved for internal use.

Returns:
User defined attributes for this node.

getGridLogger

GridLogger getGridLogger()
Should return an instance of logger to use in grid. If not provided, default value will be used. See GridFactory for information on default configuration.

Returns:
Logger to use in grid.

getMarshaller

GridMarshaller getMarshaller()
Should return an instance of marshaller to use in grid. If not provided, default value will be used. See GridFactory for information on default configuration.

Returns:
Marshaller to use in grid.

getExecutorService

ExecutorService getExecutorService()
Should return an instance of fully configured thread pool to be used in grid. This executor service will be in charge of processing GridTasks and GridJobs.

If not provided, default value will be used. See GridFactory for information on default configuration.

Returns:
Thread pool implementation to be used in grid to process job execution requests and user messages sent to the node.

getExecutorServiceShutdown

boolean getExecutorServiceShutdown()
Shutdown flag for executor service.

If not provided, default value true will be used which will shutdown executor service when GridGain stops regardless of whether it was started before GridGain or by GridGain.

Returns:
Executor service shutdown flag.

getSystemExecutorService

ExecutorService getSystemExecutorService()
Executor service that is in charge of processing GridTaskSession messages and job responses.

If not provided, default value will be used. See GridFactory for information on default configuration.

Returns:
Thread pool implementation to be used in grid for job responses and session attributes processing.

getSystemExecutorServiceShutdown

boolean getSystemExecutorServiceShutdown()
Shutdown flag for system executor service.

If not provided, default value true will be used which will shutdown executor service when GridGain stops regardless of whether it was started before GridGain or by GridGain.

Returns:
System executor service shutdown flag.

getGridGainHome

@Nullable
String getGridGainHome()
Should return GridGain installation home folder. If not provided, the system will check GRIDGAIN_HOME system property and environment variable in that order. If GRIDGAIN_HOME still could not be obtained, then grid will not start and exception will be thrown.

Returns:
GridGain installation home or null to make the system attempt to infer it automatically.
See Also:
GridSystemProperties.GG_HOME

getMBeanServer

MBeanServer getMBeanServer()
Should return MBean server instance. If not provided, the system will use default platform MBean server.

Returns:
MBean server instance or null to make the system create a default one.
See Also:
ManagementFactory.getPlatformMBeanServer()

getNodeId

UUID getNodeId()
Unique identifier for this node within grid. If not provided, default value will be used. See GridFactory for information on default configuration.

Returns:
Unique identifier for this node within grid.

getMetricsHistorySize

int getMetricsHistorySize()
Number of node metrics to keep in memory to calculate totals and averages. If not provided (value is 0), then default value GridConfiguration.DFLT_METRICS_HISTORY_SIZE is used.

Returns:
Metrics history size.
See Also:
GridConfiguration.DFLT_METRICS_HISTORY_SIZE

getMetricsExpireTime

long getMetricsExpireTime()
Elapsed time in milliseconds after which node metrics are considered expired. If not provided (value is 0), then default value GridConfiguration.DFLT_METRICS_EXPIRE_TIME is used.

Returns:
Metrics expire time.
See Also:
GridConfiguration.DFLT_METRICS_EXPIRE_TIME

getNetworkTimeout

long getNetworkTimeout()
Maximum timeout in milliseconds for network requests.

If not provided (value is 0), then default value GridConfiguration.DFLT_NETWORK_TIMEOUT is used.

Returns:
Maximum timeout for network requests.
See Also:
GridConfiguration.DFLT_NETWORK_TIMEOUT

getLifecycleBeans

GridLifecycleBean[] getLifecycleBeans()
Returns a collection of life-cycle beans. These beans will be automatically notified of grid life-cycle events. Use life-cycle beans whenever you want to perform certain logic before and after grid startup and stopping routines.

Returns:
Collection of life-cycle beans.
See Also:
GridLifecycleBean, GridLifecycleEventType

getDiscoverySpi

GridDiscoverySpi getDiscoverySpi()
Should return fully configured discovery SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid discovery SPI implementation or null to use default implementation.

getSegmentationResolveAttempts

@GridEnterpriseFeature
int getSegmentationResolveAttempts()
Gets segmentation resolve attempts. Each configured resolver will have this attempts number to pass segmentation check prior to check failure. Default is GridConfiguration.DFLT_SEG_RESOLVE_ATTEMPTS.

Returns:
Segmentation resolve attempts.

getSegmentationResolvers

@GridEnterpriseFeature
@Nullable
GridSegmentationResolver[] getSegmentationResolvers()
Returns a collection of segmentation resolvers. If array is null or empty, segmentation check is disabled.

Returns:
Segmentation resolvers.

isWaitForSegmentOnStart

@GridEnterpriseFeature
boolean isWaitForSegmentOnStart()
Gets wait for segment on startup flag. Default is GridConfiguration.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.

Returns:
True to wait for segment on startup, false otherwise.

getSegmentationPolicy

@GridEnterpriseFeature
GridSegmentationPolicy getSegmentationPolicy()
Returns segmentation policy. Default is GridConfiguration.DFLT_SEG_PLC.

Returns:
Segmentation policy.

isAllSegmentationResolversPassRequired

@GridEnterpriseFeature
boolean isAllSegmentationResolversPassRequired()
Gets all segmentation resolvers pass required flag.

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 GridConfiguration.DFLT_ALL_SEG_RESOLVERS_PASS_REQ.

Returns:
True if all segmentation resolvers should succeed, false if only one is enough.

getSegmentCheckFrequency

@GridEnterpriseFeature
int getSegmentCheckFrequency()
Returns frequency of network segment check by discovery manager.

if 0, periodic segment check is disabled and segment is checked only on topology changes (if segmentation resolvers are configured).

Default is GridConfiguration.DFLT_SEG_CHK_FREQ.

Returns:
Segment check frequency.

getCommunicationSpi

GridCommunicationSpi getCommunicationSpi()
Should return fully configured SPI communication implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid communication SPI implementation or null to use default implementation.

getEventStorageSpi

GridEventStorageSpi getEventStorageSpi()
Should return fully configured event SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid event SPI implementation or null to use default implementation.

getCollisionSpi

GridCollisionSpi getCollisionSpi()
Should return fully configured collision SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid collision SPI implementation or null to use default implementation.

getMetricsSpi

GridLocalMetricsSpi getMetricsSpi()
Should return fully configured metrics SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid metrics SPI implementation or null to use default implementation.

getDeploymentSpi

GridDeploymentSpi getDeploymentSpi()
Should return fully configured deployment SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid deployment SPI implementation or null to use default implementation.

getCheckpointSpi

GridCheckpointSpi[] getCheckpointSpi()
Should return fully configured checkpoint SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid checkpoint SPI implementation or null to use default implementation.

getFailoverSpi

GridFailoverSpi[] getFailoverSpi()
Should return fully configured failover SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid failover SPI implementation or null to use default implementation.

getTopologySpi

GridTopologySpi[] getTopologySpi()
Should return fully configured topology SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid topology SPI implementation or null to use default implementation.

getLoadBalancingSpi

GridLoadBalancingSpi[] getLoadBalancingSpi()
Should return fully configured load balancing SPI implementation. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Returns:
Grid load balancing SPI implementation or null to use default implementation.

getSwapSpaceSpi

GridSwapSpaceSpi[] getSwapSpaceSpi()
Should return fully configured swap space SPI implementations. If not provided, default implementation will be used. See GridFactory for information on default configuration.

Note that user can provide one or multiple instances of this SPI (and select later which one is used in a particular context).

Returns:
Grid swap space SPI implementation or null to use default implementation.

getDiscoveryStartupDelay

long getDiscoveryStartupDelay()
This value is used to expire messages from waiting list whenever node discovery discrepancies happen.

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 GridConfiguration.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.

Returns:
Time in milliseconds for when nodes can be out-of-sync.

getDeploymentMode

GridDeploymentMode getDeploymentMode()
Gets deployment mode for deploying tasks and other classes on this node. Refer to GridDeploymentMode documentation for more information.

Returns:
Deployment mode.

isPeerClassLoadingEnabled

boolean isPeerClassLoadingEnabled()
Returns true if peer class loading is enabled, false otherwise. Default value is true specified by GridConfiguration.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 GridTask documentation for more information about task deployment.

Returns:
true if peer class loading is enabled, false otherwise.

getPeerClassLoadingClassPathExclude

String[] getPeerClassLoadingClassPathExclude()
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.

Returns:
List of peer-to-peer loaded package names.

getPeerClassLoadingMissedResourcesCacheSize

int getPeerClassLoadingMissedResourcesCacheSize()
Returns missed resources cache size. If size greater than 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.

Returns:
Missed resources cache size.

getPeerClassLoadingExecutorService

ExecutorService getPeerClassLoadingExecutorService()
Should return an instance of fully configured executor service which is in charge of peer class loading requests/responses. If you don't use peer class loading and use GAR deployment only we would recommend to decrease the value of total threads to 1.

If not provided, default value will be used. See GridFactory for information on default configuration.

Returns:
Thread pool implementation to be used for peer class loading requests handling.

getPeerClassLoadingExecutorServiceShutdown

boolean getPeerClassLoadingExecutorServiceShutdown()
Should return flag of peer class loading executor service shutdown when the grid stops.

If not provided, default value true will be used which means that when grid will be stopped it will shut down peer class loading executor service.

Returns:
Peer class loading executor service shutdown flag.

getIncludeEventTypes

@Nullable
int[] getIncludeEventTypes()
Gets array of event types, which will be recorded.

Note, that either the include event types or the exclude event types can be provided - but not both. To disable all events this method should return an empty array and GridConfiguration.getExcludeEventTypes() should return null (which it does by default).

Note that by default all events in GridGain are enabled and therefore generated and stored by whatever event storage SPI is configured. GridGain 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.

It is highly recommended to enable only those events that your application logic requires by using either this method or GridConfiguration.getExcludeEventTypes() methods in GridGain configuration. Note that certain events are required for GridGain's internal operations and such events will still be generated but not stored by event storage SPI if they are disabled in GridGain configuration.

Returns:
Include event types.
See Also:
GridConfiguration.getExcludeEventTypes()

getExcludeEventTypes

@Nullable
int[] getExcludeEventTypes()
Gets array of event types, which will not be recorded.

Note, that either the include event types or the exclude event types can be provided - but not both. To enable all events this method should return an empty array and GridConfiguration.getIncludeEventTypes() should return null (which it does by default).

Note that by default all events in GridGain are enabled and therefore generated and stored by whatever event storage SPI is configured. GridGain 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.

It is highly recommended to enable only those events that your application logic requires by using either this method or GridConfiguration.getIncludeEventTypes() methods in GridGain configuration. Note that certain events are required for GridGain's internal operations and such events will still be generated but not stored by event storage SPI if they are disabled in GridGain configuration.

Returns:
Exclude event types.
See Also:
GridConfiguration.getIncludeEventTypes()

getCacheConfiguration

GridCacheConfiguration[] getCacheConfiguration()
Gets configuration (descriptors) for all caches.

Returns:
Array of fully initialized cache descriptors.

isDaemon

boolean isDaemon()
Whether or not this node should be a daemon node.

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 projections. The only way to see daemon nodes is to use GridProjection.daemonNodes(GridPredicate[]) method.

Daemon nodes are used primarily for management and monitoring functionality that is build on GridGain and needs to participate in the topology but also needs to be excluded from "normal" topology so that it won't participate in task execution or data grid storage.

Returns:
True if this node should be a daemon node, false otherwise.
See Also:
GridProjection.daemonNodes(GridPredicate[])

getRestJettyPath

@GridEnterpriseFeature
String getRestJettyPath()
Gets path, either absolute or relative to GRIDGAIN_HOME, to Jetty XML configuration file. Jetty is used to support REST over HTTP protocol for accessing GridGain APIs remotely.

By default, Jetty configuration file is located under GRIDGAIN_HOME/config/rest-jetty.xml.

Note that REST support available in Enterprise Edition only.

Returns:
Path to JETTY XML configuration file.
See Also:
GridSystemProperties.GG_JETTY_HOST, GridSystemProperties.GG_JETTY_PORT

isRestEnabled

@GridEnterpriseFeature
boolean isRestEnabled()
Gets flag indicating whether external REST access is enabled or not. By default, external REST access is turned on.

Note that REST support available in Enterprise Edition only.

Returns:
Flag indicating whether external REST access is enabled or not.
See Also:
GridSystemProperties.GG_JETTY_HOST, GridSystemProperties.GG_JETTY_PORT

getLocalHost

@Nullable
String getLocalHost()
Gets system-wide local address or host for all GridGain components to bind to. If provided it will override all default local bind settings within GridGain or any of its SPIs.

Returns:
Local IP address or host to bind to.

getRestSecretKey

@GridEnterpriseFeature
@Nullable
String getRestSecretKey()
Gets secret key to authenticate REST requests. If key is null or empty authentication is disabled.

Note that REST support available in Enterprise Edition only.

Returns:
Secret key.
See Also:
GridSystemProperties.GG_JETTY_HOST, GridSystemProperties.GG_JETTY_PORT

getIncludeProperties

@Nullable
String[] getIncludeProperties()
Gets array of system or environment properties to include into node attributes. If this array is 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.

Returns:
Array of system or environment properties to include into node attributes.

getLicenseUrl

@GridEnterpriseFeature
@Nullable
String getLicenseUrl()
Gets custom license file URL to be used instead of default license file location.

Returns:
Custom license file URL or null to use the default $GRIDGAIN_HOME-related location.

getMetricsLogFrequency

int getMetricsLogFrequency()
Gets frequency of metrics log print out.

If 0, metrics print out is disabled.

Metrics log print out is disabled by default.

Returns:
Frequency of metrics log print out.

getLocalEventListeners

@Nullable
Map<GridLocalEventListener,int[]> getLocalEventListeners()
Gets map of pre-configured local event listeners. Each listener is mapped to array of event types.

Returns:
Pre-configured event listeners map.
See Also:
Grid.addLocalEventListener(GridLocalEventListener, int[]), GridEventType

GridGain™ 3.6.0e
Enterprise Edition

GridGain - Real Time Big Data
Enterprise Edition, ver. 3.6.0e.13012012
2012 Copyright © GridGain Systems
Follow us:   Follow GridGain on Github Follow GridGain on Facebook Join GridGain User Group Follow GridGain on Twitter Follow GridGain on YouTube