GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid
Class GridConfigurationAdapter

java.lang.Object
  extended by org.gridgain.grid.GridConfigurationAdapter
All Implemented Interfaces:
GridConfiguration

public class GridConfigurationAdapter
extends Object
implements GridConfiguration

Adapter for GridConfiguration interface. Use it to add custom configuration for grid. 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.

Wiki & Forum:


Wiki
Forum

 

Field Summary
 
Fields inherited from interface org.gridgain.grid.GridConfiguration
COURTESY_LOGGER_NAME, DFLT_ALL_SEG_RESOLVERS_PASS_REQ, DFLT_DEPLOYMENT_MODE, DFLT_DISCOVERY_STARTUP_DELAY, DFLT_METRICS_EXPIRE_TIME, DFLT_METRICS_HISTORY_SIZE, DFLT_METRICS_LOG_FREQ, DFLT_NETWORK_TIMEOUT, DFLT_P2P_ENABLED, DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE, DFLT_P2P_THREAD_CNT, DFLT_PUBLIC_THREAD_CNT, DFLT_SEG_CHK_FREQ, DFLT_SEG_PLC, DFLT_SEG_RESOLVE_ATTEMPTS, DFLT_SMTP_FROM_EMAIL, DFLT_SMTP_PORT, DFLT_SMTP_SSL, DFLT_SMTP_STARTTLS, DFLT_SYSTEM_THREAD_CNT, DFLT_WAIT_FOR_SEG_ON_START
 
Constructor Summary
GridConfigurationAdapter()
          Creates valid grid configuration with all default values.
GridConfigurationAdapter(GridConfiguration cfg)
          Creates grid configuration by coping all configuration properties from given configuration.
 
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 grid name.
 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.
 void setAdminEmails(String[] adminEmails)
          Sets optional set of admin emails where email notifications will be set.
 void setAllSegmentationResolversPassRequired(boolean allResolversPassReq)
          Sets all segmentation resolvers pass required flag.
 void setCacheConfiguration(GridCacheConfiguration... cacheCfg)
          Sets cache configurations.
 void setCheckpointSpi(GridCheckpointSpi... cpSpi)
          Sets fully configured instance of GridCheckpointSpi.
 void setCollisionSpi(GridCollisionSpi colSpi)
          Sets fully configured instance of GridCollisionSpi.
 void setCommunicationSpi(GridCommunicationSpi commSpi)
          Sets fully configured instance of GridCommunicationSpi.
 void setDaemon(boolean daemon)
          Sets daemon flag.
 void setDeploymentMode(GridDeploymentMode deployMode)
          Sets task classes and resources sharing mode.
 void setDeploymentSpi(GridDeploymentSpi deploySpi)
          Sets fully configured instance of GridDeploymentSpi.
 void setDiscoverySpi(GridDiscoverySpi discoSpi)
          Sets fully configured instance of GridDiscoverySpi.
 void setDiscoveryStartupDelay(long discoStartupDelay)
          Sets time in milliseconds after which a certain metric value is considered expired.
 void setEventStorageSpi(GridEventStorageSpi evtSpi)
          Sets fully configured instance of GridEventStorageSpi.
 void setExcludeEventTypes(int... exclEvtTypes)
          Sets array of event types, which will not be recorded by GridEventStorageManager.record(GridEvent).
 void setExecutorService(ExecutorService execSvc)
          Sets thread pool to use within grid.
 void setExecutorServiceShutdown(boolean execSvcShutdown)
          Sets executor service shutdown flag.
 void setFailoverSpi(GridFailoverSpi... failSpi)
          Sets fully configured instance of GridFailoverSpi.
 void setGridGainHome(String ggHome)
          Sets GridGain installation folder.
 void setGridLogger(GridLogger log)
          Sets logger to use within grid.
 void setGridName(String gridName)
          Sets grid name.
 void setIncludeEventTypes(int... inclEvtTypes)
          Sets array of event types, which will be recorded by GridEventStorageManager.record(GridEvent).
 void setIncludeProperties(String... includeProps)
          Sets array of system or environment property names to include into node attributes.
 void setLicenseUrl(String licUrl)
          Sets license URL different from the default location of the license file.
 void setLifecycleBeans(GridLifecycleBean... lifecycleBeans)
          Sets a collection of lifecycle beans.
 void setLifeCycleEmailNotification(boolean lifeCycleEmailNtf)
          Sets whether or not to enable lifecycle email notifications.
 void setLoadBalancingSpi(GridLoadBalancingSpi... loadBalancingSpi)
          Sets fully configured instance of GridLoadBalancingSpi.
 void setLocalEventListeners(Map<GridLocalEventListener,int[]> lsnrs)
          Sets map of pre-configured local event listeners.
 void setLocalHost(String locHost)
          Sets system-wide local address or host for all GridGain components to bind to.
 void setMarshaller(GridMarshaller marsh)
          Sets marshaller to use within grid.
 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(int metricsLogFreq)
          Sets frequency of metrics log print out.
 void setMetricsSpi(GridLocalMetricsSpi metricsSpi)
          Sets fully configured instance of GridLocalMetricsSpi.
 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 setPeerClassLoadingExecutorService(ExecutorService p2pSvc)
          Sets thread pool to use for peer class loading.
 void setPeerClassLoadingExecutorServiceShutdown(boolean p2pSvcShutdown)
          Sets peer class loading executor service shutdown flag.
 void setPeerClassLoadingLocalClassPathExclude(String... p2pLocalClsPathExcl)
          Sets list of packages in a system class path that should be to P2P loaded even if they exist locally.
 void setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize)
          Sets size of missed resources cache.
 void setRestEnabled(boolean restEnabled)
          Sets flag indicating whether external REST access is enabled or not.
 void setRestJettyPath(String jettyPath)
          Sets path, either absolute or relative to GRIDGAIN_HOME, to JETTY XML configuration file.
 void setRestSecretKey(String restSecretKey)
          Sets secret key to authenticate REST requests.
 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(int segChkFreq)
          Sets network segment check frequency.
 void setSmtpFromEmail(String smtpFromEmail)
          Sets optional FROM email address for email notifications.
 void setSmtpHost(String smtpHost)
          Sets SMTP host.
 void setSmtpPassword(String smtpPwd)
          Sets SMTP password or null if not used.
 void setSmtpPort(int smtpPort)
          Sets SMTP port.
 void setSmtpSsl(boolean smtpSsl)
          Sets whether or not SMTP uses SSL.
 void setSmtpStartTls(boolean smtpStartTls)
          Sets whether or not SMTP uses STARTTLS.
 void setSmtpUsername(String smtpUsername)
          Sets SMTP username or null if not used.
 void setSwapSpaceSpi(GridSwapSpaceSpi... swapSpaceSpi)
          Sets fully configured instances of GridSwapSpaceSpi.
 void setSystemExecutorService(ExecutorService systemSvc)
          Sets system thread pool to use within grid.
 void setSystemExecutorServiceShutdown(boolean sysSvcShutdown)
          Sets system executor service shutdown flag.
 void setTopologySpi(GridTopologySpi... topSpi)
          Sets fully configured instance of GridTopologySpi.
 void setUserAttributes(Map<String,?> userAttrs)
          Sets user attributes for this node.
 void setWaitForSegOnStart(boolean waitForSegOnStart)
          Sets wait for segment on start flag.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GridConfigurationAdapter

public GridConfigurationAdapter()
Creates valid grid configuration with all default values.


GridConfigurationAdapter

public GridConfigurationAdapter(GridConfiguration cfg)
Creates grid configuration by coping all configuration properties from given configuration.

Parameters:
cfg - Grid configuration to copy from.
Method Detail

isLifeCycleEmailNotification

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

Specified by:
isLifeCycleEmailNotification in interface GridConfiguration
Returns:
True to enable lifecycle email notifications.
See Also:
GridConfiguration.getSmtpHost(), GridConfiguration.getAdminEmails()

getLicenseUrl

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

Specified by:
getLicenseUrl in interface GridConfiguration
Returns:
Custom license file URL or null to use the default $GRIDGAIN_HOME-related location.

isSmtpSsl

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

Specified by:
isSmtpSsl in interface GridConfiguration
Returns:
Whether or not to use SSL fot SMTP.
See Also:
GridConfiguration.DFLT_SMTP_SSL, GridSystemProperties.GG_SMTP_SSL

isSmtpStartTls

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

Specified by:
isSmtpStartTls in interface GridConfiguration
Returns:
Whether or not to use STARTTLS fot SMTP.
See Also:
GridConfiguration.DFLT_SMTP_STARTTLS, GridSystemProperties.GG_SMTP_STARTTLS

getSmtpHost

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

Specified by:
getSmtpHost in interface GridConfiguration
Returns:
SMTP host name or null if SMTP is not configured.
See Also:
GridSystemProperties.GG_SMTP_HOST

getSmtpPort

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

Specified by:
getSmtpPort in interface GridConfiguration
Returns:
SMTP port.
See Also:
GridConfiguration.DFLT_SMTP_PORT, GridSystemProperties.GG_SMTP_PORT

getSmtpUsername

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

Specified by:
getSmtpUsername in interface GridConfiguration
Returns:
SMTP username or null.
See Also:
GridSystemProperties.GG_SMTP_USERNAME

getSmtpPassword

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

Specified by:
getSmtpPassword in interface GridConfiguration
Returns:
SMTP password or null.
See Also:
GridSystemProperties.GG_SMTP_PWD

getAdminEmails

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

Specified by:
getAdminEmails in interface GridConfiguration
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

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

Specified by:
getSmtpFromEmail in interface GridConfiguration
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

setLicenseUrl

public void setLicenseUrl(String licUrl)
Sets license URL different from the default location of the license file.

Parameters:
licUrl - License URl to set.

setLifeCycleEmailNotification

@GridEnterpriseFeature
public void setLifeCycleEmailNotification(boolean lifeCycleEmailNtf)
Sets whether or not to enable lifecycle email notifications.

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

Parameters:
lifeCycleEmailNtf - True to enable lifecycle email notifications.
See Also:
GridSystemProperties.GG_LIFECYCLE_EMAIL_NOTIFY

setSmtpSsl

public void setSmtpSsl(boolean smtpSsl)
Sets whether or not SMTP uses 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 GridConfigurationAdapter.setSmtpHost(String) is the only mandatory SMTP configuration property.

Parameters:
smtpSsl - Whether or not SMTP uses SSL.
See Also:
GridSystemProperties.GG_SMTP_SSL

setSmtpStartTls

public void setSmtpStartTls(boolean smtpStartTls)
Sets whether or not SMTP uses 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 GridConfigurationAdapter.setSmtpHost(String) is the only mandatory SMTP configuration property.

Parameters:
smtpStartTls - Whether or not SMTP uses STARTTLS.
See Also:
GridSystemProperties.GG_SMTP_STARTTLS

setSmtpHost

public void setSmtpHost(String smtpHost)
Sets SMTP host.

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 #setSmtpHost(String) is the only mandatory SMTP configuration property.

Parameters:
smtpHost - SMTP host to set or null to disable sending emails.
See Also:
GridSystemProperties.GG_SMTP_HOST

setSmtpPort

public void setSmtpPort(int smtpPort)
Sets 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 GridConfigurationAdapter.setSmtpHost(String) is the only mandatory SMTP configuration property.

Parameters:
smtpPort - SMTP port to set.
See Also:
GridConfiguration.DFLT_SMTP_PORT, GridSystemProperties.GG_SMTP_PORT

setSmtpUsername

public void setSmtpUsername(String smtpUsername)
Sets 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 GridConfigurationAdapter.setSmtpHost(String) is the only mandatory SMTP configuration property.

Parameters:
smtpUsername - SMTP username or null.
See Also:
GridSystemProperties.GG_SMTP_USERNAME

setSmtpPassword

public void setSmtpPassword(String smtpPwd)
Sets 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 GridConfigurationAdapter.setSmtpHost(String) is the only mandatory SMTP configuration property.

Parameters:
smtpPwd - SMTP password or null.
See Also:
GridSystemProperties.GG_SMTP_PWD

setAdminEmails

public void setAdminEmails(String[] adminEmails)
Sets 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.

Parameters:
adminEmails - 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

setSmtpFromEmail

public void setSmtpFromEmail(String smtpFromEmail)
Sets optional FROM email address for email notifications. By default GridConfiguration.DFLT_SMTP_FROM_EMAIL will be used.

Parameters:
smtpFromEmail - 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

public String getGridName()
Gets optional grid name. Returns null if non-default grid name was not provided.

Specified by:
getGridName in interface GridConfiguration
Returns:
Optional grid name. Can be null, which is default grid name, if non-default grid name was not provided.

isDaemon

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

Specified by:
isDaemon in interface GridConfiguration
Returns:
True if this node should be a daemon node, false otherwise.
See Also:
GridProjection.daemonNodes(GridPredicate[])

setDaemon

public void setDaemon(boolean daemon)
Sets daemon flag.

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.

Parameters:
daemon - Daemon flag.

setGridName

public void setGridName(String gridName)
Sets grid name. Note that null is a default grid name.

Parameters:
gridName - Grid name to set. Can be null, which is default grid name.

getUserAttributes

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

Specified by:
getUserAttributes in interface GridConfiguration
Returns:
User defined attributes for this node.

setUserAttributes

public void setUserAttributes(Map<String,?> userAttrs)
Sets user attributes for this node.

Parameters:
userAttrs - User attributes for this node.
See Also:
GridConfiguration.getUserAttributes()

getGridLogger

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

Specified by:
getGridLogger in interface GridConfiguration
Returns:
Logger to use in grid.

setGridLogger

public void setGridLogger(GridLogger log)
Sets logger to use within grid.

Parameters:
log - Logger to use within grid.
See Also:
GridConfiguration.getGridLogger()

getExecutorService

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

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

getSystemExecutorService

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

Specified by:
getSystemExecutorService in interface GridConfiguration
Returns:
Thread pool implementation to be used in grid for job responses and session attributes processing.

getPeerClassLoadingExecutorService

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

Specified by:
getPeerClassLoadingExecutorService in interface GridConfiguration
Returns:
Thread pool implementation to be used for peer class loading requests handling.

getExecutorServiceShutdown

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

Specified by:
getExecutorServiceShutdown in interface GridConfiguration
Returns:
Executor service shutdown flag.

getSystemExecutorServiceShutdown

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

Specified by:
getSystemExecutorServiceShutdown in interface GridConfiguration
Returns:
System executor service shutdown flag.

getPeerClassLoadingExecutorServiceShutdown

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

Specified by:
getPeerClassLoadingExecutorServiceShutdown in interface GridConfiguration
Returns:
Peer class loading executor service shutdown flag.

setExecutorService

public void setExecutorService(ExecutorService execSvc)
Sets thread pool to use within grid.

Parameters:
execSvc - Thread pool to use within grid.
See Also:
GridConfiguration.getExecutorService()

setExecutorServiceShutdown

public void setExecutorServiceShutdown(boolean execSvcShutdown)
Sets executor service shutdown flag.

Parameters:
execSvcShutdown - Executor service shutdown flag.
See Also:
GridConfiguration.getExecutorServiceShutdown()

setSystemExecutorService

public void setSystemExecutorService(ExecutorService systemSvc)
Sets system thread pool to use within grid.

Parameters:
systemSvc - Thread pool to use within grid.
See Also:
GridConfiguration.getSystemExecutorService()

setSystemExecutorServiceShutdown

public void setSystemExecutorServiceShutdown(boolean sysSvcShutdown)
Sets system executor service shutdown flag.

Parameters:
sysSvcShutdown - System executor service shutdown flag.
See Also:
GridConfiguration.getSystemExecutorServiceShutdown()

setPeerClassLoadingExecutorService

public void setPeerClassLoadingExecutorService(ExecutorService p2pSvc)
Sets thread pool to use for peer class loading.

Parameters:
p2pSvc - Thread pool to use within grid.
See Also:
GridConfiguration.getPeerClassLoadingExecutorService()

setPeerClassLoadingExecutorServiceShutdown

public void setPeerClassLoadingExecutorServiceShutdown(boolean p2pSvcShutdown)
Sets peer class loading executor service shutdown flag.

Parameters:
p2pSvcShutdown - Peer class loading executor service shutdown flag.
See Also:
GridConfiguration.getPeerClassLoadingExecutorServiceShutdown()

getGridGainHome

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

Specified by:
getGridGainHome in interface GridConfiguration
Returns:
GridGain installation home or null to make the system attempt to infer it automatically.
See Also:
GridSystemProperties.GG_HOME

setGridGainHome

public void setGridGainHome(String ggHome)
Sets GridGain installation folder.

Parameters:
ggHome - GridGain installation folder.
See Also:
GridConfiguration.getGridGainHome(), GridSystemProperties.GG_HOME

getMBeanServer

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

Specified by:
getMBeanServer in interface GridConfiguration
Returns:
MBean server instance or null to make the system create a default one.
See Also:
ManagementFactory.getPlatformMBeanServer()

setMBeanServer

public void setMBeanServer(MBeanServer mbeanSrv)
Sets initialized and started MBean server.

Parameters:
mbeanSrv - Initialized and started MBean server.

getNodeId

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

Specified by:
getNodeId in interface GridConfiguration
Returns:
Unique identifier for this node within grid.

setNodeId

public void setNodeId(@Nullable
                      UUID nodeId)
Sets unique identifier for local node.

Parameters:
nodeId - Unique identifier for local node.
See Also:
GridConfiguration.getNodeId()

getMarshaller

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

Specified by:
getMarshaller in interface GridConfiguration
Returns:
Marshaller to use in grid.

setMarshaller

public void setMarshaller(GridMarshaller marsh)
Sets marshaller to use within grid.

Parameters:
marsh - Marshaller to use within grid.
See Also:
GridConfiguration.getMarshaller()

isPeerClassLoadingEnabled

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

Specified by:
isPeerClassLoadingEnabled in interface GridConfiguration
Returns:
true if peer class loading is enabled, false otherwise.

setPeerClassLoadingEnabled

public void setPeerClassLoadingEnabled(boolean p2pEnabled)
Enables/disables peer class loading.

Parameters:
p2pEnabled - true if peer class loading is enabled, false otherwise.

getPeerClassLoadingClassPathExclude

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

Specified by:
getPeerClassLoadingClassPathExclude in interface GridConfiguration
Returns:
List of peer-to-peer loaded package names.

setPeerClassLoadingLocalClassPathExclude

public void setPeerClassLoadingLocalClassPathExclude(String... p2pLocalClsPathExcl)
Sets list of packages in a system class path that should be to P2P loaded even if they exist locally.

Parameters:
p2pLocalClsPathExcl - List of P2P loaded packages. Package name supports '*' at the end like in package import clause.

getMetricsHistorySize

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

Specified by:
getMetricsHistorySize in interface GridConfiguration
Returns:
Metrics history size.
See Also:
GridConfiguration.DFLT_METRICS_HISTORY_SIZE

setMetricsHistorySize

public void setMetricsHistorySize(int metricsHistSize)
Sets number of metrics kept in history to compute totals and averages. If not explicitly set, then default value is 10,000.

Parameters:
metricsHistSize - Number of metrics kept in history to use for metric totals and averages calculations.
See Also:
GridConfiguration.DFLT_METRICS_HISTORY_SIZE

getMetricsExpireTime

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

Specified by:
getMetricsExpireTime in interface GridConfiguration
Returns:
Metrics expire time.
See Also:
GridConfiguration.DFLT_METRICS_EXPIRE_TIME

setMetricsExpireTime

public void setMetricsExpireTime(long metricsExpTime)
Sets time in milliseconds after which a certain metric value is considered expired. If not set explicitly, then default value is 600,000 milliseconds (10 minutes).

Parameters:
metricsExpTime - The metricsExpTime to set.
See Also:
GridConfiguration.DFLT_METRICS_EXPIRE_TIME

getNetworkTimeout

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

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

Specified by:
getNetworkTimeout in interface GridConfiguration
Returns:
Maximum timeout for network requests.
See Also:
GridConfiguration.DFLT_NETWORK_TIMEOUT

setNetworkTimeout

public void setNetworkTimeout(long netTimeout)
Maximum timeout in milliseconds for network requests.

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

Parameters:
netTimeout - Maximum timeout for network requests.
See Also:
GridConfiguration.DFLT_NETWORK_TIMEOUT

getLifecycleBeans

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

Specified by:
getLifecycleBeans in interface GridConfiguration
Returns:
Collection of life-cycle beans.
See Also:
GridLifecycleBean, GridLifecycleEventType

setLifecycleBeans

public void setLifecycleBeans(GridLifecycleBean... lifecycleBeans)
Sets a collection of lifecycle beans. These beans will be automatically notified of grid lifecycle events. Use lifecycle beans whenever you want to perform certain logic before and after grid startup and stopping routines.

Parameters:
lifecycleBeans - Collection of lifecycle beans.
See Also:
GridLifecycleEventType

getEventStorageSpi

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

Specified by:
getEventStorageSpi in interface GridConfiguration
Returns:
Grid event SPI implementation or null to use default implementation.

setEventStorageSpi

public void setEventStorageSpi(GridEventStorageSpi evtSpi)
Sets fully configured instance of GridEventStorageSpi.

Parameters:
evtSpi - Fully configured instance of GridEventStorageSpi.
See Also:
GridConfiguration.getEventStorageSpi()

getDiscoverySpi

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

Specified by:
getDiscoverySpi in interface GridConfiguration
Returns:
Grid discovery SPI implementation or null to use default implementation.

setDiscoverySpi

public void setDiscoverySpi(GridDiscoverySpi discoSpi)
Sets fully configured instance of GridDiscoverySpi.

Parameters:
discoSpi - Fully configured instance of GridDiscoverySpi.
See Also:
GridConfiguration.getDiscoverySpi()

getSegmentationPolicy

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

Specified by:
getSegmentationPolicy in interface GridConfiguration
Returns:
Segmentation policy.

setSegmentationPolicy

public void setSegmentationPolicy(GridSegmentationPolicy segPlc)
Sets segmentation policy.

Parameters:
segPlc - Segmentation policy.

isWaitForSegmentOnStart

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

Specified by:
isWaitForSegmentOnStart in interface GridConfiguration
Returns:
True to wait for segment on startup, false otherwise.

setWaitForSegOnStart

public void setWaitForSegOnStart(boolean waitForSegOnStart)
Sets wait for segment on start flag.

Parameters:
waitForSegOnStart - True to wait for segment on start.

isAllSegmentationResolversPassRequired

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

Specified by:
isAllSegmentationResolversPassRequired in interface GridConfiguration
Returns:
True if all segmentation resolvers should succeed, false if only one is enough.

setAllSegmentationResolversPassRequired

public void setAllSegmentationResolversPassRequired(boolean allResolversPassReq)
Sets all segmentation resolvers pass required flag.

Parameters:
allResolversPassReq - True if all segmentation resolvers should succeed for node to be in the correct segment.

getSegmentationResolveAttempts

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

Specified by:
getSegmentationResolveAttempts in interface GridConfiguration
Returns:
Segmentation resolve attempts.

setSegmentationResolveAttempts

public void setSegmentationResolveAttempts(int segResolveAttempts)
Sets segmentation resolve attempts count.

Parameters:
segResolveAttempts - Segmentation resolve attempts.

getSegmentationResolvers

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

Specified by:
getSegmentationResolvers in interface GridConfiguration
Returns:
Segmentation resolvers.

setSegmentationResolvers

public void setSegmentationResolvers(@Nullable
                                     GridSegmentationResolver... segResolvers)
Sets segmentation resolvers.

Parameters:
segResolvers - Segmentation resolvers.

getSegmentCheckFrequency

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

Specified by:
getSegmentCheckFrequency in interface GridConfiguration
Returns:
Segment check frequency.

setSegmentCheckFrequency

public void setSegmentCheckFrequency(int segChkFreq)
Sets network segment check frequency.

Parameters:
segChkFreq - Segment check frequency.

getCommunicationSpi

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

Specified by:
getCommunicationSpi in interface GridConfiguration
Returns:
Grid communication SPI implementation or null to use default implementation.

setCommunicationSpi

public void setCommunicationSpi(GridCommunicationSpi commSpi)
Sets fully configured instance of GridCommunicationSpi.

Parameters:
commSpi - Fully configured instance of GridCommunicationSpi.
See Also:
GridConfiguration.getCommunicationSpi()

getCollisionSpi

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

Specified by:
getCollisionSpi in interface GridConfiguration
Returns:
Grid collision SPI implementation or null to use default implementation.

setCollisionSpi

public void setCollisionSpi(GridCollisionSpi colSpi)
Sets fully configured instance of GridCollisionSpi.

Parameters:
colSpi - Fully configured instance of GridCollisionSpi or null if no SPI provided.
See Also:
GridConfiguration.getCollisionSpi()

getMetricsSpi

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

Specified by:
getMetricsSpi in interface GridConfiguration
Returns:
Grid metrics SPI implementation or null to use default implementation.

setMetricsSpi

public void setMetricsSpi(GridLocalMetricsSpi metricsSpi)
Sets fully configured instance of GridLocalMetricsSpi.

Parameters:
metricsSpi - Fully configured instance of GridLocalMetricsSpi or null if no SPI provided.
See Also:
GridConfiguration.getMetricsSpi()

getDeploymentSpi

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

Specified by:
getDeploymentSpi in interface GridConfiguration
Returns:
Grid deployment SPI implementation or null to use default implementation.

setDeploymentSpi

public void setDeploymentSpi(GridDeploymentSpi deploySpi)
Sets fully configured instance of GridDeploymentSpi.

Parameters:
deploySpi - Fully configured instance of GridDeploymentSpi.
See Also:
GridConfiguration.getDeploymentSpi()

getCheckpointSpi

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

Specified by:
getCheckpointSpi in interface GridConfiguration
Returns:
Grid checkpoint SPI implementation or null to use default implementation.

setCheckpointSpi

public void setCheckpointSpi(GridCheckpointSpi... cpSpi)
Sets fully configured instance of GridCheckpointSpi.

Parameters:
cpSpi - Fully configured instance of GridCheckpointSpi.
See Also:
GridConfiguration.getCheckpointSpi()

getFailoverSpi

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

Specified by:
getFailoverSpi in interface GridConfiguration
Returns:
Grid failover SPI implementation or null to use default implementation.

setFailoverSpi

public void setFailoverSpi(GridFailoverSpi... failSpi)
Sets fully configured instance of GridFailoverSpi.

Parameters:
failSpi - Fully configured instance of GridFailoverSpi or null if no SPI provided.
See Also:
GridConfiguration.getFailoverSpi()

getTopologySpi

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

Specified by:
getTopologySpi in interface GridConfiguration
Returns:
Grid topology SPI implementation or null to use default implementation.

setTopologySpi

public void setTopologySpi(GridTopologySpi... topSpi)
Sets fully configured instance of GridTopologySpi.

Parameters:
topSpi - Fully configured instance of GridTopologySpi or null if no SPI provided.
See Also:
GridConfiguration.getTopologySpi()

getLoadBalancingSpi

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

Specified by:
getLoadBalancingSpi in interface GridConfiguration
Returns:
Grid load balancing SPI implementation or null to use default implementation.

getDiscoveryStartupDelay

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

Specified by:
getDiscoveryStartupDelay in interface GridConfiguration
Returns:
Time in milliseconds for when nodes can be out-of-sync.

setDiscoveryStartupDelay

public void setDiscoveryStartupDelay(long discoStartupDelay)
Sets time in milliseconds after which a certain metric value is considered expired. If not set explicitly, then default value is 600,000 milliseconds (10 minutes).

Parameters:
discoStartupDelay - Time in milliseconds for when nodes can be out-of-sync during startup.

setLoadBalancingSpi

public void setLoadBalancingSpi(GridLoadBalancingSpi... loadBalancingSpi)
Sets fully configured instance of GridLoadBalancingSpi.

Parameters:
loadBalancingSpi - Fully configured instance of GridLoadBalancingSpi or null if no SPI provided.
See Also:
GridConfiguration.getLoadBalancingSpi()

setSwapSpaceSpi

public void setSwapSpaceSpi(GridSwapSpaceSpi... swapSpaceSpi)
Sets fully configured instances of GridSwapSpaceSpi.

Parameters:
swapSpaceSpi - Fully configured instances of GridSwapSpaceSpi or null if no SPI provided.
See Also:
GridConfiguration.getSwapSpaceSpi()

getSwapSpaceSpi

public 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).

Specified by:
getSwapSpaceSpi in interface GridConfiguration
Returns:
Grid swap space SPI implementation or null to use default implementation.

setDeploymentMode

public void setDeploymentMode(GridDeploymentMode deployMode)
Sets task classes and resources sharing mode.

Parameters:
deployMode - Task classes and resources sharing mode.

getDeploymentMode

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

Specified by:
getDeploymentMode in interface GridConfiguration
Returns:
Deployment mode.

setPeerClassLoadingMissedResourcesCacheSize

public void setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize)
Sets size of missed resources cache. Set 0 to avoid missed resources caching.

Parameters:
p2pMissedCacheSize - Size of missed resources cache.

getPeerClassLoadingMissedResourcesCacheSize

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

Specified by:
getPeerClassLoadingMissedResourcesCacheSize in interface GridConfiguration
Returns:
Missed resources cache size.

getCacheConfiguration

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

Specified by:
getCacheConfiguration in interface GridConfiguration
Returns:
Array of fully initialized cache descriptors.

setCacheConfiguration

public void setCacheConfiguration(GridCacheConfiguration... cacheCfg)
Sets cache configurations.

Parameters:
cacheCfg - Cache configurations.

getIncludeEventTypes

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

Specified by:
getIncludeEventTypes in interface GridConfiguration
Returns:
Include event types.
See Also:
GridConfiguration.getExcludeEventTypes()

setIncludeEventTypes

public void setIncludeEventTypes(int... inclEvtTypes)
Sets array of event types, which will be recorded by GridEventStorageManager.record(GridEvent). Note, that either the include event types or the exclude event types can be established.

Parameters:
inclEvtTypes - Include event types.

getExcludeEventTypes

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

Specified by:
getExcludeEventTypes in interface GridConfiguration
Returns:
Exclude event types.
See Also:
GridConfiguration.getIncludeEventTypes()

setExcludeEventTypes

public void setExcludeEventTypes(int... exclEvtTypes)
Sets array of event types, which will not be recorded by GridEventStorageManager.record(GridEvent). Note, that either the include event types or the exclude event types can be established.

Parameters:
exclEvtTypes - Exclude event types.

setRestJettyPath

public void setRestJettyPath(String jettyPath)
Sets 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.

Parameters:
jettyPath - Path to JETTY XML configuration file.

getRestJettyPath

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

Specified by:
getRestJettyPath in interface GridConfiguration
Returns:
Path to JETTY XML configuration file.
See Also:
GridSystemProperties.GG_JETTY_HOST, GridSystemProperties.GG_JETTY_PORT

setRestEnabled

public void setRestEnabled(boolean restEnabled)
Sets flag indicating whether external REST access is enabled or not.

Parameters:
restEnabled - Flag indicating whether external REST access is enabled or not.

isRestEnabled

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

Specified by:
isRestEnabled in interface GridConfiguration
Returns:
Flag indicating whether external REST access is enabled or not.
See Also:
GridSystemProperties.GG_JETTY_HOST, GridSystemProperties.GG_JETTY_PORT

setLocalHost

public void setLocalHost(String locHost)
Sets 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.

Parameters:
locHost - Local IP address or host to bind to.

getLocalHost

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

Specified by:
getLocalHost in interface GridConfiguration
Returns:
Local IP address or host to bind to.

setRestSecretKey

public void setRestSecretKey(String restSecretKey)
Sets secret key to authenticate REST requests. If key is null or empty authentication is disabled.

Parameters:
restSecretKey - REST secret key.

getRestSecretKey

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

Specified by:
getRestSecretKey in interface GridConfiguration
Returns:
Secret key.
See Also:
GridSystemProperties.GG_JETTY_HOST, GridSystemProperties.GG_JETTY_PORT

getIncludeProperties

@Nullable
public 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.

Specified by:
getIncludeProperties in interface GridConfiguration
Returns:
Array of system or environment properties to include into node attributes.

setIncludeProperties

public void setIncludeProperties(String... includeProps)
Sets array of system or environment property names to include into node attributes. See GridConfigurationAdapter.getIncludeProperties() for more info.

Parameters:
includeProps - Array of system or environment property names to include into node attributes.

getMetricsLogFrequency

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

If 0, metrics print out is disabled.

Metrics log print out is disabled by default.

Specified by:
getMetricsLogFrequency in interface GridConfiguration
Returns:
Frequency of metrics log print out.

setMetricsLogFrequency

public void setMetricsLogFrequency(int metricsLogFreq)
Sets frequency of metrics log print out.

If 0, metrics print out is disabled.

Metrics log print out is disabled by default.

Parameters:
metricsLogFreq - Frequency of metrics log print out.

getLocalEventListeners

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

Specified by:
getLocalEventListeners in interface GridConfiguration
Returns:
Pre-configured event listeners map.
See Also:
Grid.addLocalEventListener(GridLocalEventListener, int[]), GridEventType

setLocalEventListeners

public void setLocalEventListeners(Map<GridLocalEventListener,int[]> lsnrs)
Sets map of pre-configured local event listeners. Each listener is mapped to array of event types.

Parameters:
lsnrs - Pre-configured event listeners map.

toString

public String toString()

Overrides:
toString in class Object

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