public class GridConfiguration extends Object
GridGain.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
GridGain.start(GridConfiguration) method to initialize GridGain instance.
Note that you should only set values that differ from defaults, as grid will automatically pick default values for all values that are not set.
For more information about grid configuration and startup refer to GridGain
documentation.
| Modifier and Type | Field and Description |
|---|---|
static String |
COURTESY_LOGGER_NAME
Courtesy notice log category.
|
static boolean |
DFLT_ALL_SEG_RESOLVERS_PASS_REQ
Default value for all segmentation resolvers pass required.
|
static boolean |
DFLT_CACHE_SANITY_CHECK_ENABLED
Default value for cache sanity check enabled flag.
|
static int |
DFLT_CLOCK_SYNC_FREQUENCY
Default clock synchronization frequency.
|
static int |
DFLT_CLOCK_SYNC_SAMPLES
Default number of clock sync samples.
|
static 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 int |
DFLT_GGFS_THREADPOOL_QUEUE_CAP
Default max queue capacity of GGFS thread pool.
|
static boolean |
DFLT_MARSHAL_LOCAL_JOBS
Default marshal local jobs flag.
|
static long |
DFLT_METRICS_EXPIRE_TIME
Default metrics expire time.
|
static int |
DFLT_METRICS_HISTORY_SIZE
Default metrics history size (value is
10000). |
static long |
DFLT_METRICS_LOG_FREQ
Default frequency of metrics log print out.
|
static long |
DFLT_METRICS_UPDATE_FREQ
Default metrics update frequency.
|
static int |
DFLT_MGMT_THREAD_CNT
Default size of management thread pool.
|
static long |
DFLT_NETWORK_TIMEOUT
Default maximum timeout to wait for network responses in milliseconds (value is
5,000ms). |
static boolean |
DFLT_P2P_ENABLED
Default flag for peer class loading.
|
static int |
DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE
Default cache size for missed resources.
|
static int |
DFLT_P2P_THREAD_CNT
Default size of peer class loading thread pool.
|
static int |
DFLT_PUBLIC_CORE_THREAD_CNT
Default core size of public thread pool.
|
static long |
DFLT_PUBLIC_KEEP_ALIVE_TIME
Default keep alive time for public thread pool.
|
static int |
DFLT_PUBLIC_MAX_THREAD_CNT
Default max size of public thread pool.
|
static int |
DFLT_PUBLIC_THREADPOOL_QUEUE_CAP
Default max queue capacity of public thread pool.
|
static int |
DFLT_REST_CORE_THREAD_CNT
Default size of REST thread pool.
|
static int |
DFLT_REST_IDLE_TIMEOUT
Default REST idle timeout.
|
static long |
DFLT_REST_KEEP_ALIVE_TIME
Default keep alive time for REST thread pool.
|
static int |
DFLT_REST_MAX_THREAD_CNT
Default max size of REST thread pool.
|
static int |
DFLT_REST_PORT_RANGE
Default rest port range.
|
static boolean |
DFLT_REST_TCP_DIRECT_BUF
Default TCP direct buffer flag.
|
static int |
DFLT_REST_THREADPOOL_QUEUE_CAP
Default max queue capacity of REST thread pool.
|
static long |
DFLT_SEG_CHK_FREQ
Default segment check frequency in discovery manager.
|
static GridSegmentationPolicy |
DFLT_SEG_PLC
Default segmentation policy.
|
static int |
DFLT_SEG_RESOLVE_ATTEMPTS
Default value segmentation resolve attempts count.
|
static int |
DFLT_SEND_RETRY_CNT
Default message send retries count.
|
static long |
DFLT_SEND_RETRY_DELAY
Default interval between message send retries.
|
static 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_CORE_THREAD_CNT
Default size of system thread pool.
|
static long |
DFLT_SYSTEM_KEEP_ALIVE_TIME
Default keep alive time for system thread pool.
|
static int |
DFLT_SYSTEM_MAX_THREAD_CNT
Default max size of system thread pool.
|
static int |
DFLT_SYSTEM_THREADPOOL_QUEUE_CAP
Default max queue capacity of system thread pool.
|
static boolean |
DFLT_TCP_NODELAY
Default TCP_NODELAY flag.
|
static int |
DFLT_TCP_PORT
Default TCP server port.
|
static int |
DFLT_TIME_SERVER_PORT_BASE
Default time server port base.
|
static int |
DFLT_TIME_SERVER_PORT_RANGE
Default time server port range.
|
static boolean |
DFLT_WAIT_FOR_SEG_ON_START
Default value for wait for segment on startup flag.
|
| Constructor and Description |
|---|
GridConfiguration()
Creates valid grid configuration with all default values.
|
GridConfiguration(GridConfiguration cfg)
Creates grid configuration by coping all configuration properties from
given configuration.
|
| Modifier and Type | Method and Description |
|---|---|
GridAddressResolver |
getAddressResolver()
Gets address resolver for addresses mapping determination.
|
String[] |
getAdminEmails()
Gets optional set of admin emails where email notifications will be set.
|
GridAuthenticationSpi |
getAuthenticationSpi()
Should return fully configured authentication SPI implementation.
|
GridCacheConfiguration[] |
getCacheConfiguration()
Gets configuration (descriptors) for all caches.
|
GridCheckpointSpi[] |
getCheckpointSpi()
Should return fully configured checkpoint SPI implementation.
|
GridClientMessageInterceptor |
getClientMessageInterceptor()
Gets interceptor for objects, moving to and from remote clients.
|
long |
getClockSyncFrequency()
Gets frequency at which clock is synchronized between nodes, in milliseconds.
|
int |
getClockSyncSamples()
Gets number of samples used to synchronize clocks between different nodes.
|
GridCollisionSpi |
getCollisionSpi()
Should return fully configured collision SPI implementation.
|
GridCommunicationSpi |
getCommunicationSpi()
Should return fully configured SPI communication implementation.
|
byte |
getDataCenterId()
Gets data center ID of the grid.
|
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.
|
GridDrReceiverHubConfiguration |
getDrReceiverHubConfiguration()
Set data center receiver hub configuration.
|
GridDrSenderHubConfiguration |
getDrSenderHubConfiguration()
Get data center sender hub configuration.
|
GridEventStorageSpi |
getEventStorageSpi()
Should return fully configured event SPI implementation.
|
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.
|
GridGgfsConfiguration[] |
getGgfsConfiguration()
Gets GGFS configurations.
|
ExecutorService |
getGgfsExecutorService()
Executor service that is in charge of processing outgoing GGFS messages.
|
boolean |
getGgfsExecutorServiceShutdown()
Shutdown flag for GGFS executor service.
|
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.
|
GridIndexingSpi[] |
getIndexingSpi()
Should return fully configured indexing SPI implementations.
|
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.
|
String |
getLocalHost()
Gets system-wide local address or host for all GridGain components to bind to.
|
ExecutorService |
getManagementExecutorService()
Executor service that is in charge of processing internal and Visor
GridJobs. |
boolean |
getManagementExecutorServiceShutdown()
Shutdown flag for management executor service.
|
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.
|
long |
getMetricsLogFrequency()
Gets frequency of metrics log print out.
|
long |
getMetricsUpdateFrequency()
Gets job metrics update frequency in milliseconds.
|
int |
getNetworkSendRetryCount()
Message send retries count.
|
long |
getNetworkSendRetryDelay()
Interval in milliseconds between message send retries.
|
long |
getNetworkTimeout()
Maximum timeout in milliseconds for network requests.
|
UUID |
getNodeId()
Unique identifier for this node within grid.
|
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.
|
String[] |
getPeerClassLoadingLocalClassPathExclude()
Should return list of packages from the system classpath that need to
be peer-to-peer loaded from task originating node.
|
int |
getPeerClassLoadingMissedResourcesCacheSize()
Returns missed resources cache size.
|
String[] |
getRestAccessibleFolders()
Gets list of folders that are accessible for log reading command.
|
ExecutorService |
getRestExecutorService()
Should return an instance of fully configured thread pool to be used for
processing of client messages (REST requests).
|
boolean |
getRestExecutorServiceShutdown()
Shutdown flag for REST executor service.
|
long |
getRestIdleTimeout()
Gets idle timeout for REST server.
|
String |
getRestJettyPath()
Gets path, either absolute or relative to
GRIDGAIN_HOME, to Jetty
XML configuration file. |
int |
getRestPortRange()
Gets number of ports to try if configured port is already in use.
|
String |
getRestSecretKey()
Gets secret key to authenticate REST requests.
|
String |
getRestTcpHost()
Gets host for TCP binary protocol server.
|
int |
getRestTcpPort()
Gets port for TCP binary protocol server.
|
int |
getRestTcpReceiveBufferSize()
Gets REST TCP server receive buffer size.
|
int |
getRestTcpSelectorCount()
Gets number of selector threads in REST TCP server.
|
int |
getRestTcpSendBufferSize()
Gets REST TCP server send buffer size.
|
int |
getRestTcpSendQueueLimit()
Gets REST TCP server send queue limit.
|
GridSslContextFactory |
getRestTcpSslContextFactory()
Gets context factory that will be used for creating a secure socket layer of rest binary server.
|
GridSecureSessionSpi |
getSecureSessionSpi()
Should return fully configured secure session SPI implementation.
|
GridSecurityCredentialsProvider |
getSecurityCredentialsProvider()
Gets security credentials.
|
GridSegmentationPolicy |
getSegmentationPolicy()
Returns segmentation policy.
|
int |
getSegmentationResolveAttempts()
Gets segmentation resolve attempts.
|
GridSegmentationResolver[] |
getSegmentationResolvers()
Returns a collection of segmentation resolvers.
|
long |
getSegmentCheckFrequency()
Returns frequency of network segment check by discovery manager.
|
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. |
GridStreamerConfiguration[] |
getStreamerConfiguration()
Gets streamers configurations.
|
GridSwapSpaceSpi |
getSwapSpaceSpi()
Should return fully configured swap space SPI implementation.
|
ExecutorService |
getSystemExecutorService()
Executor service that is in charge of processing internal system messages.
|
boolean |
getSystemExecutorServiceShutdown()
Shutdown flag for system executor service.
|
int |
getTimeServerPortBase()
Gets base UPD port number for grid time server.
|
int |
getTimeServerPortRange()
Defines port range to try for time server start.
|
Map<String,?> |
getUserAttributes()
Should return any user-defined attributes to be added to this node.
|
String |
getWorkDirectory()
Gets GridGain work folder.
|
boolean |
isAllSegmentationResolversPassRequired()
Gets all segmentation resolvers pass required flag.
|
boolean |
isCacheSanityCheckEnabled()
Gets flag indicating whether cache sanity check is enabled.
|
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 |
isMarshalLocalJobs()
If this flag is set to
true, jobs mapped to local node will be
marshalled as if it was remote node. |
boolean |
isPeerClassLoadingEnabled()
Returns
true if peer class loading is enabled, false
otherwise. |
boolean |
isRestEnabled()
Gets flag indicating whether external
REST access is enabled or not. |
boolean |
isRestTcpDirectBuffer()
Gets flag indicating whether REST TCP server should use direct buffers.
|
boolean |
isRestTcpNoDelay()
Gets flag indicating whether
TCP_NODELAY option should be set for accepted client connections. |
boolean |
isRestTcpSslClientAuth()
Gets a flag indicating whether or not remote clients will be required to have a valid SSL certificate which
validity will be verified with trust manager.
|
boolean |
isRestTcpSslEnabled()
Whether secure socket layer should be enabled on binary rest server.
|
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 |
setAddressResolver(GridAddressResolver addrRslvr) |
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 |
setAuthenticationSpi(GridAuthenticationSpi authSpi)
Sets fully configured instance of
GridAuthenticationSpi. |
void |
setCacheConfiguration(GridCacheConfiguration... cacheCfg)
Sets cache configurations.
|
void |
setCacheSanityCheckEnabled(boolean cacheSanityCheckEnabled)
Sets cache sanity check flag.
|
void |
setCheckpointSpi(GridCheckpointSpi... cpSpi)
Sets fully configured instance of
GridCheckpointSpi. |
void |
setClientMessageInterceptor(GridClientMessageInterceptor interceptor)
Sets client message interceptor.
|
void |
setClockSyncFrequency(long clockSyncFreq)
Sets clock synchronization frequency in milliseconds.
|
void |
setClockSyncSamples(int clockSyncSamples)
Sets number of samples used for clock synchronization.
|
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 |
setDataCenterId(byte dataCenterId)
Sets data center ID of the grid.
|
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 |
setDrReceiverHubConfiguration(GridDrReceiverHubConfiguration drRcvHubCfg)
Set data center sender hub configuration.
|
void |
setDrSenderHubConfiguration(GridDrSenderHubConfiguration drSndHubCfg)
Set data center receiver hub configuration.
|
void |
setEventStorageSpi(GridEventStorageSpi evtSpi)
Sets fully configured instance of
GridEventStorageSpi. |
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 |
setGgfsConfiguration(GridGgfsConfiguration... ggfsCfg)
Sets GGFS configurations.
|
void |
setGgfsExecutorService(ExecutorService ggfsSvc)
Set executor service that will be used to process outgoing GGFS messages.
|
void |
setGgfsExecutorServiceShutdown(boolean ggfsSvcShutdown)
Sets GGFS executor service shutdown flag.
|
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 |
setIndexingSpi(GridIndexingSpi... indexingSpi)
Sets fully configured instances of
GridIndexingSpi. |
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 |
setLocalHost(String locHost)
Sets system-wide local address or host for all GridGain components to bind to.
|
void |
setManagementExecutorService(ExecutorService mgmtSvc)
Sets management thread pool to use within grid.
|
void |
setManagementExecutorServiceShutdown(boolean mgmtSvcShutdown)
Sets management executor service shutdown flag.
|
void |
setMarshaller(GridMarshaller marsh)
Sets marshaller to use within grid.
|
void |
setMarshalLocalJobs(boolean marshLocJobs)
Sets marshal local jobs flag.
|
void |
setMBeanServer(MBeanServer mbeanSrv)
Sets initialized and started MBean server.
|
void |
setMetricsExpireTime(long metricsExpTime)
Sets time in milliseconds after which a certain metric value is considered expired.
|
void |
setMetricsHistorySize(int metricsHistSize)
Sets number of metrics kept in history to compute totals and averages.
|
void |
setMetricsLogFrequency(long metricsLogFreq)
Sets frequency of metrics log print out.
|
void |
setMetricsUpdateFrequency(long metricsUpdateFreq)
Sets job metrics update frequency in milliseconds.
|
void |
setNetworkSendRetryCount(int sndRetryCnt)
Sets message send retries count.
|
void |
setNetworkSendRetryDelay(long sndRetryDelay)
Sets interval in milliseconds between message send retries.
|
void |
setNetworkTimeout(long netTimeout)
Maximum timeout in milliseconds for network requests.
|
void |
setNodeId(UUID nodeId)
Sets unique identifier for local node.
|
void |
setPeerClassLoadingEnabled(boolean p2pEnabled)
Enables/disables peer class loading.
|
void |
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... p2pLocClsPathExcl)
Sets list of packages in a system class path that should be P2P
loaded even if they exist locally.
|
void |
setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize)
Sets size of missed resources cache.
|
void |
setRestAccessibleFolders(String... restAccessibleFolders)
Sets array of folders accessible by REST processor for log reading command.
|
void |
setRestEnabled(boolean restEnabled)
Sets flag indicating whether external
REST access is enabled or not. |
void |
setRestExecutorService(ExecutorService restExecSvc)
Sets thread pool to use for processing of client messages (REST requests).
|
void |
setRestExecutorServiceShutdown(boolean restSvcShutdown)
Sets REST executor service shutdown flag.
|
void |
setRestIdleTimeout(long restIdleTimeout)
Sets idle timeout for REST server.
|
void |
setRestJettyPath(String jettyPath)
Sets path, either absolute or relative to
GRIDGAIN_HOME, to JETTY
XML configuration file. |
void |
setRestPortRange(int restPortRange)
Sets number of ports to try if configured one is in use.
|
void |
setRestSecretKey(String restSecretKey)
Sets secret key to authenticate REST requests.
|
void |
setRestTcpDirectBuffer(boolean restTcpDirectBuf)
Sets whether to use direct buffer for REST TCP server.
|
void |
setRestTcpHost(String restTcpHost)
Sets host for TCP binary protocol server.
|
void |
setRestTcpNoDelay(boolean restTcpNoDelay)
Sets whether
TCP_NODELAY option should be set for all accepted client connections. |
void |
setRestTcpPort(int restTcpPort)
Sets port for TCP binary protocol server.
|
void |
setRestTcpReceiveBufferSize(int restTcpRcvBufSize)
Sets REST TCP server receive buffer size.
|
void |
setRestTcpSelectorCount(int restTcpSelectorCnt)
Sets number of selector threads for REST TCP server.
|
void |
setRestTcpSendBufferSize(int restTcpSndBufSize)
Sets REST TCP server send buffer size.
|
void |
setRestTcpSendQueueLimit(int restTcpSndQueueLimit)
Sets REST TCP server send queue limit.
|
void |
setRestTcpSslClientAuth(boolean needClientAuth)
Sets flag indicating whether or not SSL client authentication is required.
|
void |
setRestTcpSslContextFactory(GridSslContextFactory restTcpSslCtxFactory)
Sets instance of
GridSslContextFactory that will be used to create an instance of SSLContext
for Secure Socket Layer on TCP binary protocol. |
void |
setRestTcpSslEnabled(boolean restTcpSslEnabled)
Sets whether Secure Socket Layer should be enabled for REST TCP binary protocol.
|
void |
setSecureSessionSpi(GridSecureSessionSpi sesSpi)
Sets fully configured instance of
GridSecureSessionSpi. |
void |
setSecurityCredentialsProvider(GridSecurityCredentialsProvider securityCred)
Sets security credentials.
|
void |
setSegmentationPolicy(GridSegmentationPolicy segPlc)
Sets segmentation policy.
|
void |
setSegmentationResolveAttempts(int segResolveAttempts)
Sets segmentation resolve attempts count.
|
void |
setSegmentationResolvers(GridSegmentationResolver... segResolvers)
Sets segmentation resolvers.
|
void |
setSegmentCheckFrequency(long segChkFreq)
Sets network segment check frequency.
|
void |
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 |
setStreamerConfiguration(GridStreamerConfiguration... streamerCfg)
Sets streamer configuration.
|
void |
setSwapSpaceSpi(GridSwapSpaceSpi swapSpaceSpi)
Sets fully configured instances of
GridSwapSpaceSpi. |
void |
setSystemExecutorService(ExecutorService sysSvc)
Sets system thread pool to use within grid.
|
void |
setSystemExecutorServiceShutdown(boolean sysSvcShutdown)
Sets system executor service shutdown flag.
|
void |
setTimeServerPortBase(int timeSrvPortBase)
Sets time server port base.
|
void |
setTimeServerPortRange(int timeSrvPortRange)
Sets time server port range.
|
void |
setUserAttributes(Map<String,?> userAttrs)
Sets user attributes for this node.
|
void |
setWaitForSegmentOnStart(boolean waitForSegOnStart)
Sets wait for segment on start flag.
|
void |
setWorkDirectory(String ggWork)
Sets GridGain work folder.
|
String |
toString() |
public static final String COURTESY_LOGGER_NAME
public static final boolean DFLT_P2P_ENABLED
false
which means that peer class loading is disabled.public static final int DFLT_METRICS_HISTORY_SIZE
10000).public static final long DFLT_METRICS_UPDATE_FREQ
public static final long DFLT_METRICS_EXPIRE_TIME
Long.MAX_VALUE which
means that metrics never expire.public static final long DFLT_NETWORK_TIMEOUT
5,000ms).public static final long DFLT_SEND_RETRY_DELAY
public static final int DFLT_SEND_RETRY_CNT
public static final int DFLT_CLOCK_SYNC_SAMPLES
public static final int DFLT_CLOCK_SYNC_FREQUENCY
public static final long DFLT_DISCOVERY_STARTUP_DELAY
60,000ms).public static final GridDeploymentMode DFLT_DEPLOYMENT_MODE
GridDeploymentMode.SHARED).public static final int DFLT_P2P_MISSED_RESOURCES_CACHE_SIZE
public static final int DFLT_SMTP_PORT
public static final boolean DFLT_SMTP_SSL
public static final boolean DFLT_SMTP_STARTTLS
public static final String DFLT_SMTP_FROM_EMAIL
public static final int DFLT_TIME_SERVER_PORT_BASE
public static final int DFLT_TIME_SERVER_PORT_RANGE
public static final int DFLT_PUBLIC_CORE_THREAD_CNT
public static final int DFLT_PUBLIC_MAX_THREAD_CNT
public static final long DFLT_PUBLIC_KEEP_ALIVE_TIME
public static final int DFLT_PUBLIC_THREADPOOL_QUEUE_CAP
public static final int DFLT_SYSTEM_CORE_THREAD_CNT
public static final int DFLT_SYSTEM_MAX_THREAD_CNT
public static final long DFLT_SYSTEM_KEEP_ALIVE_TIME
public static final int DFLT_SYSTEM_THREADPOOL_QUEUE_CAP
public static final int DFLT_P2P_THREAD_CNT
public static final int DFLT_MGMT_THREAD_CNT
public static final int DFLT_GGFS_THREADPOOL_QUEUE_CAP
public static final int DFLT_REST_CORE_THREAD_CNT
public static final int DFLT_REST_MAX_THREAD_CNT
public static final long DFLT_REST_KEEP_ALIVE_TIME
public static final int DFLT_REST_THREADPOOL_QUEUE_CAP
public static final GridSegmentationPolicy DFLT_SEG_PLC
public static final boolean DFLT_WAIT_FOR_SEG_ON_START
public static final boolean DFLT_ALL_SEG_RESOLVERS_PASS_REQ
public static final int DFLT_SEG_RESOLVE_ATTEMPTS
public static final long DFLT_SEG_CHK_FREQ
public static final long DFLT_METRICS_LOG_FREQ
public static final int DFLT_TCP_PORT
public static final boolean DFLT_TCP_NODELAY
public static final boolean DFLT_REST_TCP_DIRECT_BUF
public static final int DFLT_REST_IDLE_TIMEOUT
public static final int DFLT_REST_PORT_RANGE
public static final boolean DFLT_MARSHAL_LOCAL_JOBS
public static final boolean DFLT_CACHE_SANITY_CHECK_ENABLED
public GridConfiguration()
public GridConfiguration(GridConfiguration cfg)
cfg - Grid configuration to copy from.public boolean isLifeCycleEmailNotification()
By default - email notifications are enabled.
True to enable lifecycle email notifications.getSmtpHost(),
getAdminEmails()@Nullable public String getLicenseUrl()
null to use the default
$GRIDGAIN_HOME-related location.public boolean isSmtpSsl()
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 getSmtpHost() is the only mandatory SMTP
configuration property.
DFLT_SMTP_SSL,
GridSystemProperties.GG_SMTP_SSLpublic boolean isSmtpStartTls()
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 getSmtpHost() is the only mandatory SMTP
configuration property.
DFLT_SMTP_STARTTLS,
GridSystemProperties.GG_SMTP_STARTTLS@Nullable public String getSmtpHost()
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.
null if SMTP is not configured.GridSystemProperties.GG_SMTP_HOSTpublic int getSmtpPort()
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 getSmtpHost() is the only mandatory SMTP
configuration property.
DFLT_SMTP_PORT,
GridSystemProperties.GG_SMTP_PORT@Nullable public String getSmtpUsername()
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 getSmtpHost() is the only mandatory SMTP
configuration property.
null.GridSystemProperties.GG_SMTP_USERNAME@Nullable public String getSmtpPassword()
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 getSmtpHost() is the only mandatory SMTP
configuration property.
null.GridSystemProperties.GG_SMTP_PWDpublic String[] getAdminEmails()
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.
null - emails will be sent only to the email in the license
if one provided.GridSystemProperties.GG_ADMIN_EMAILS@Nullable public String getSmtpFromEmail()
DFLT_SMTP_FROM_EMAIL will be used.null
- DFLT_SMTP_FROM_EMAIL will be used by default.DFLT_SMTP_FROM_EMAIL,
GridSystemProperties.GG_SMTP_FROMpublic void setLicenseUrl(String licUrl)
licUrl - License URl to set.public void setLifeCycleEmailNotification(boolean lifeCycleEmailNtf)
lifeCycleEmailNtf - True to enable lifecycle email notifications.GridSystemProperties.GG_LIFECYCLE_EMAIL_NOTIFYpublic void setSmtpSsl(boolean smtpSsl)
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.
smtpSsl - Whether or not SMTP uses SSL.GridSystemProperties.GG_SMTP_SSLpublic void setSmtpStartTls(boolean smtpStartTls)
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.
smtpStartTls - Whether or not SMTP uses STARTTLS.GridSystemProperties.GG_SMTP_STARTTLSpublic void setSmtpHost(String smtpHost)
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.
smtpHost - SMTP host to set or null to disable sending emails.GridSystemProperties.GG_SMTP_HOSTpublic void setSmtpPort(int smtpPort)
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 setSmtpHost(String) is the only mandatory SMTP
configuration property.
smtpPort - SMTP port to set.DFLT_SMTP_PORT,
GridSystemProperties.GG_SMTP_PORTpublic void setSmtpUsername(String smtpUsername)
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 setSmtpHost(String) is the only mandatory SMTP
configuration property.
smtpUsername - SMTP username or null.GridSystemProperties.GG_SMTP_USERNAMEpublic void setSmtpPassword(String smtpPwd)
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 setSmtpHost(String) is the only mandatory SMTP
configuration property.
smtpPwd - SMTP password or null.GridSystemProperties.GG_SMTP_PWDpublic void setAdminEmails(String[] adminEmails)
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.
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.GridSystemProperties.GG_ADMIN_EMAILSpublic void setSmtpFromEmail(String smtpFromEmail)
DFLT_SMTP_FROM_EMAIL will be used.smtpFromEmail - Optional FROM email address for email notifications. If null
- DFLT_SMTP_FROM_EMAIL will be used by default.DFLT_SMTP_FROM_EMAIL,
GridSystemProperties.GG_SMTP_FROMpublic String getGridName()
null if non-default grid name was not
provided.null, which is default grid name, if
non-default grid name was not provided.public boolean isDaemon()
Daemon nodes are the usual grid nodes that participate in topology but not
visible on the main APIs, i.e. they are not part of any projections. The only
way to see daemon nodes is to use GridProjection.forDaemons() 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 in-memory data grid storage.
True if this node should be a daemon node, false otherwise.GridProjection.forDaemons()public void setDaemon(boolean daemon)
Daemon nodes are the usual grid nodes that participate in topology but not
visible on the main APIs, i.e. they are not part of any projections. The only
way to see daemon nodes is to use GridProjection.forDaemons() 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 in-memory data grid storage.
daemon - Daemon flag.public void setGridName(String gridName)
null is a default grid name.gridName - Grid name to set. Can be null, which is default
grid name.public Map<String,?> getUserAttributes()
GridNode.attribute(String) or
GridNode.attributes() methods.
Note that system adds the following (among others) attributes automatically:
{@link System#getProperties()} - All system properties.{@link System#getenv(String)} - All environment properties.Note that grid will add all System properties and environment properties to grid node attributes also. SPIs may also add node attributes that are used for SPI implementation.
NOTE: attributes names starting with org.gridgain are reserved
for internal use.
public void setUserAttributes(Map<String,?> userAttrs)
userAttrs - User attributes for this node.getUserAttributes()public GridLogger getGridLogger()
GridLog4jLogger
will be used.public void setGridLogger(GridLogger log)
log - Logger to use within grid.getGridLogger()public ExecutorService getExecutorService()
GridJobs
and user messages sent to node.
If not provided, new executor service will be created using the following configuration:
DFLT_PUBLIC_CORE_THREAD_CNTDFLT_PUBLIC_MAX_THREAD_CNTDFLT_PUBLIC_THREADPOOL_QUEUE_CAPpublic ExecutorService getSystemExecutorService()
If not provided, new executor service will be created using the following configuration:
DFLT_SYSTEM_CORE_THREAD_CNTDFLT_SYSTEM_MAX_THREAD_CNTDFLT_SYSTEM_THREADPOOL_QUEUE_CAPpublic ExecutorService getManagementExecutorService()
GridJobs.
If not provided, new executor service will be created using the following configuration:
DFLT_MGMT_THREAD_CNTDFLT_MGMT_THREAD_CNTpublic ExecutorService getPeerClassLoadingExecutorService()
1.
If not provided, new executor service will be created using the following configuration:
DFLT_P2P_THREAD_CNTDFLT_P2P_THREAD_CNTpublic ExecutorService getGgfsExecutorService()
If not provided, new executor service will be created using the following configuration:
DFLT_GGFS_THREADPOOL_QUEUE_CAPpublic boolean getExecutorServiceShutdown()
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.
public boolean getSystemExecutorServiceShutdown()
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.
public boolean getManagementExecutorServiceShutdown()
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.
public boolean getPeerClassLoadingExecutorServiceShutdown()
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.
public boolean getGgfsExecutorServiceShutdown()
If not provided, default value true will be used which will shutdown
executor service when GridGain stops regardless whether it was started before GridGain
or by GridGain.
public void setExecutorService(ExecutorService execSvc)
execSvc - Thread pool to use within grid.getExecutorService()public void setExecutorServiceShutdown(boolean execSvcShutdown)
execSvcShutdown - Executor service shutdown flag.getExecutorServiceShutdown()public void setSystemExecutorService(ExecutorService sysSvc)
sysSvc - Thread pool to use within grid.getSystemExecutorService()public void setSystemExecutorServiceShutdown(boolean sysSvcShutdown)
sysSvcShutdown - System executor service shutdown flag.getSystemExecutorServiceShutdown()public void setManagementExecutorService(ExecutorService mgmtSvc)
mgmtSvc - Thread pool to use within grid.getManagementExecutorService()public void setManagementExecutorServiceShutdown(boolean mgmtSvcShutdown)
mgmtSvcShutdown - Management executor service shutdown flag.getManagementExecutorServiceShutdown()public void setPeerClassLoadingExecutorService(ExecutorService p2pSvc)
p2pSvc - Thread pool to use within grid.getPeerClassLoadingExecutorService()public void setPeerClassLoadingExecutorServiceShutdown(boolean p2pSvcShutdown)
p2pSvcShutdown - Peer class loading executor service shutdown flag.getPeerClassLoadingExecutorServiceShutdown()public void setGgfsExecutorService(ExecutorService ggfsSvc)
ggfsSvc - Executor service to use for outgoing GGFS messages.getGgfsExecutorService()public void setGgfsExecutorServiceShutdown(boolean ggfsSvcShutdown)
ggfsSvcShutdown - GGFS executor service shutdown flag.getGgfsExecutorService()@Nullable public String getGridGainHome()
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.null to make the system attempt to
infer it automatically.GridSystemProperties.GG_HOMEpublic void setGridGainHome(String ggHome)
ggHome - GridGain installation folder.getGridGainHome(),
GridSystemProperties.GG_HOME@Nullable public String getWorkDirectory()
GRIDGAIN_HOME specified by setGridGainHome(String) or
GRIDGAIN_HOME environment variable or system property.
If GRIDGAIN_HOME is not provided, then system temp folder is used.
null to make the system attempt to infer it automatically.getGridGainHome(),
GridSystemProperties.GG_HOMEpublic void setWorkDirectory(String ggWork)
ggWork - GridGain work folder.getWorkDirectory()public MBeanServer getMBeanServer()
null to make the system create a default one.ManagementFactory.getPlatformMBeanServer()public void setMBeanServer(MBeanServer mbeanSrv)
mbeanSrv - Initialized and started MBean server.public UUID getNodeId()
public void setNodeId(@Nullable UUID nodeId)
nodeId - Unique identifier for local node.getNodeId()public GridMarshaller getMarshaller()
GridOptimizedMarshaller will be used on Java HotSpot VM, and
GridJdkMarshaller will be used on other VMs.public void setMarshaller(GridMarshaller marsh)
marsh - Marshaller to use within grid.getMarshaller()public boolean isPeerClassLoadingEnabled()
true if peer class loading is enabled, false
otherwise. Default value is false specified by DFLT_P2P_ENABLED.
When peer class loading is enabled and task is not deployed on local node, local node will try to load classes from the node that initiated task execution. This way, a task can be physically deployed only on one node and then internally penetrate to all other nodes.
See GridComputeTask documentation for more information about task deployment.
true if peer class loading is enabled, false
otherwise.public boolean isMarshalLocalJobs()
true, jobs mapped to local node will be
marshalled as if it was remote node.
If not provided, default value is defined by DFLT_MARSHAL_LOCAL_JOBS.
True if local jobs should be marshalled.public void setMarshalLocalJobs(boolean marshLocJobs)
marshLocJobs - True if local jobs should be marshalled.public void setPeerClassLoadingEnabled(boolean p2pEnabled)
p2pEnabled - true if peer class loading is
enabled, false otherwise.public String[] getPeerClassLoadingLocalClassPathExclude()
public void setPeerClassLoadingLocalClassPathExclude(String... p2pLocClsPathExcl)
p2pLocClsPathExcl - List of P2P loaded packages. Package
name supports '*' at the end like in package import clause.public int getMetricsHistorySize()
0), then default value
DFLT_METRICS_HISTORY_SIZE is used.DFLT_METRICS_HISTORY_SIZEpublic void setMetricsHistorySize(int metricsHistSize)
10,000.metricsHistSize - Number of metrics kept in history to use for
metric totals and averages calculations.DFLT_METRICS_HISTORY_SIZEpublic long getMetricsUpdateFrequency()
Updating metrics too frequently may have negative performance impact.
The following values are accepted:
-1 job metrics are never updated.0 job metrics are updated on each job start and finish.DFLT_METRICS_UPDATE_FREQ is used.DFLT_METRICS_UPDATE_FREQ is used.DFLT_METRICS_UPDATE_FREQpublic void setMetricsUpdateFrequency(long metricsUpdateFreq)
If set to -1 job metrics are never updated.
If set to 0 job metrics are updated on each job start and finish.
Positive value defines the actual update frequency.
If not provided, then default value
DFLT_METRICS_UPDATE_FREQ is used.
metricsUpdateFreq - Job metrics update frequency in milliseconds.public long getMetricsExpireTime()
DFLT_METRICS_EXPIRE_TIME is used.DFLT_METRICS_EXPIRE_TIMEpublic void setMetricsExpireTime(long metricsExpTime)
600,000 milliseconds (10 minutes).metricsExpTime - The metricsExpTime to set.DFLT_METRICS_EXPIRE_TIMEpublic long getNetworkTimeout()
If not provided, then default value
DFLT_NETWORK_TIMEOUT is used.
DFLT_NETWORK_TIMEOUTpublic void setNetworkTimeout(long netTimeout)
If not provided (value is 0), then default value
DFLT_NETWORK_TIMEOUT is used.
netTimeout - Maximum timeout for network requests.DFLT_NETWORK_TIMEOUTpublic long getNetworkSendRetryDelay()
If not provided, then default value
DFLT_SEND_RETRY_DELAY is used.
getNetworkSendRetryCount(),
DFLT_SEND_RETRY_DELAYpublic void setNetworkSendRetryDelay(long sndRetryDelay)
If not provided, then default value
DFLT_SEND_RETRY_DELAY is used.
sndRetryDelay - Interval between message send retries.public int getNetworkSendRetryCount()
If not provided, then default value
DFLT_SEND_RETRY_CNT is used.
getNetworkSendRetryDelay(),
DFLT_SEND_RETRY_CNTpublic void setNetworkSendRetryCount(int sndRetryCnt)
If not provided, then default value
DFLT_SEND_RETRY_CNT is used.
sndRetryCnt - Message send retries count.public int getClockSyncSamples()
Clock synchronization is used for cache version assignment in CLOCK order mode.
public void setClockSyncSamples(int clockSyncSamples)
clockSyncSamples - Number of samples.public long getClockSyncFrequency()
Clock synchronization is used for cache version assignment in CLOCK order mode.
public void setClockSyncFrequency(long clockSyncFreq)
clockSyncFreq - Clock synchronization frequency.public GridLifecycleBean[] getLifecycleBeans()
GridLifecycleBean,
GridLifecycleEventTypepublic void setLifecycleBeans(GridLifecycleBean... lifecycleBeans)
lifecycleBeans - Collection of lifecycle beans.GridLifecycleEventTypepublic GridEventStorageSpi getEventStorageSpi()
GridMemoryEventStorageSpi will be used.null to use default implementation.public void setEventStorageSpi(GridEventStorageSpi evtSpi)
GridEventStorageSpi.evtSpi - Fully configured instance of GridEventStorageSpi.getEventStorageSpi()public GridDiscoverySpi getDiscoverySpi()
GridTcpDiscoverySpi will be used by default.null to use default implementation.public void setDiscoverySpi(GridDiscoverySpi discoSpi)
GridDiscoverySpi.discoSpi - Fully configured instance of GridDiscoverySpi.getDiscoverySpi()public GridSegmentationPolicy getSegmentationPolicy()
DFLT_SEG_PLC.public void setSegmentationPolicy(GridSegmentationPolicy segPlc)
segPlc - Segmentation policy.public boolean isWaitForSegmentOnStart()
DFLT_WAIT_FOR_SEG_ON_START.
Returns true if node should wait for correct segment on start.
If node detects that segment is incorrect on startup and this method
returns true, node waits until segment becomes correct.
If segment is incorrect on startup and this method returns false,
exception is thrown.
True to wait for segment on startup, false otherwise.public void setWaitForSegmentOnStart(boolean waitForSegOnStart)
waitForSegOnStart - True to wait for segment on start.public boolean isAllSegmentationResolversPassRequired()
Returns true if all segmentation resolvers should succeed
for node to be in correct segment.
Returns false if at least one segmentation resolver should succeed
for node to be in correct segment.
Default is DFLT_ALL_SEG_RESOLVERS_PASS_REQ.
True if all segmentation resolvers should succeed,
false if only one is enough.public void setAllSegmentationResolversPassRequired(boolean allResolversPassReq)
allResolversPassReq - True if all segmentation resolvers should
succeed for node to be in the correct segment.public int getSegmentationResolveAttempts()
DFLT_SEG_RESOLVE_ATTEMPTS.public void setSegmentationResolveAttempts(int segResolveAttempts)
segResolveAttempts - Segmentation resolve attempts.@Nullable public GridSegmentationResolver[] getSegmentationResolvers()
If array is null or empty, periodical and on-start network
segment checks do not happen.
public void setSegmentationResolvers(@Nullable GridSegmentationResolver... segResolvers)
segResolvers - Segmentation resolvers.public long getSegmentCheckFrequency()
if 0, periodic segment check is disabled and segment is checked only on topology changes (if segmentation resolvers are configured).
Default is DFLT_SEG_CHK_FREQ.
public void setSegmentCheckFrequency(long segChkFreq)
segChkFreq - Segment check frequency.public GridCommunicationSpi getCommunicationSpi()
GridTcpCommunicationSpi will be used by default.null to use default implementation.public void setCommunicationSpi(GridCommunicationSpi commSpi)
GridCommunicationSpi.commSpi - Fully configured instance of GridCommunicationSpi.getCommunicationSpi()public GridCollisionSpi getCollisionSpi()
GridNoopCollisionSpi is used and jobs get activated immediately
on arrive to mapped node. This approach suits well for large amount of small
jobs (which is a wide-spread use case). User still can control the number
of concurrent jobs by setting maximum thread pool size defined by
GridConfiguration.getExecutorService() configuration property.null to use default implementation.public void setCollisionSpi(GridCollisionSpi colSpi)
GridCollisionSpi.colSpi - Fully configured instance of GridCollisionSpi or
null if no SPI provided.getCollisionSpi()public GridAuthenticationSpi getAuthenticationSpi()
GridNoopAuthenticationSpi will be used.null to use default implementation.public void setAuthenticationSpi(GridAuthenticationSpi authSpi)
GridAuthenticationSpi.authSpi - Fully configured instance of GridAuthenticationSpi or
null if no SPI provided.getAuthenticationSpi()public GridSecureSessionSpi getSecureSessionSpi()
GridNoopSecureSessionSpi will be used.null to use default implementation.public void setSecureSessionSpi(GridSecureSessionSpi sesSpi)
GridSecureSessionSpi.sesSpi - Fully configured instance of GridSecureSessionSpi or
null if no SPI provided.getSecureSessionSpi()public GridDeploymentSpi getDeploymentSpi()
GridLocalDeploymentSpi will be used.null to use default implementation.public void setDeploymentSpi(GridDeploymentSpi deploySpi)
GridDeploymentSpi.deploySpi - Fully configured instance of GridDeploymentSpi.getDeploymentSpi()public GridCheckpointSpi[] getCheckpointSpi()
GridNoopCheckpointSpi will be used.null to use default implementation.public void setCheckpointSpi(GridCheckpointSpi... cpSpi)
GridCheckpointSpi.cpSpi - Fully configured instance of GridCheckpointSpi.getCheckpointSpi()public GridFailoverSpi[] getFailoverSpi()
GridAlwaysFailoverSpi will be used.null to use default implementation.public void setFailoverSpi(GridFailoverSpi... failSpi)
GridFailoverSpi.failSpi - Fully configured instance of GridFailoverSpi or
null if no SPI provided.getFailoverSpi()public GridLoadBalancingSpi[] getLoadBalancingSpi()
GridRoundRobinLoadBalancingSpi will be used.null to use default implementation.public long getDiscoveryStartupDelay()
During startup, it is possible for some SPIs to have a small time window when Node A has discovered Node B, but Node B has not discovered Node A yet. Such time window is usually very small, a matter of milliseconds, but certain JMS providers, for example, may be very slow and hence have larger discovery delay window.
The default value of this property is 60,000 specified by
DFLT_DISCOVERY_STARTUP_DELAY. This should be good enough for vast
majority of configurations. However, if you do anticipate an even larger
delay, you should increase this value.
public void setDiscoveryStartupDelay(long discoStartupDelay)
600,000 milliseconds (10 minutes).discoStartupDelay - Time in milliseconds for when nodes
can be out-of-sync during startup.public void setLoadBalancingSpi(GridLoadBalancingSpi... loadBalancingSpi)
GridLoadBalancingSpi.loadBalancingSpi - Fully configured instance of GridLoadBalancingSpi or
null if no SPI provided.getLoadBalancingSpi()public void setSwapSpaceSpi(GridSwapSpaceSpi swapSpaceSpi)
GridSwapSpaceSpi.swapSpaceSpi - Fully configured instances of GridSwapSpaceSpi or
null if no SPI provided.getSwapSpaceSpi()public GridSwapSpaceSpi getSwapSpaceSpi()
GridFileSwapSpaceSpi will be used.
Note that user can provide one or multiple instances of this SPI (and select later which one is used in a particular context).
public void setIndexingSpi(GridIndexingSpi... indexingSpi)
GridIndexingSpi.indexingSpi - Fully configured instances of GridIndexingSpi.getIndexingSpi()public GridIndexingSpi[] getIndexingSpi()
GridH2IndexingSpi will be used.
Note that user can provide one or multiple instances of this SPI (and select later which one is used in a particular context).
public GridAddressResolver getAddressResolver()
public void setAddressResolver(GridAddressResolver addrRslvr)
public void setDeploymentMode(GridDeploymentMode deployMode)
deployMode - Task classes and resources sharing mode.public GridDeploymentMode getDeploymentMode()
GridDeploymentMode documentation for more information.public void setPeerClassLoadingMissedResourcesCacheSize(int p2pMissedCacheSize)
p2pMissedCacheSize - Size of missed resources cache.public int getPeerClassLoadingMissedResourcesCacheSize()
0, missed
resources will be cached and next resource request ignored. If size is 0,
then request for the resource will be sent to the remote node every time this
resource is requested.public GridCacheConfiguration[] getCacheConfiguration()
public void setCacheConfiguration(GridCacheConfiguration... cacheCfg)
cacheCfg - Cache configurations.public boolean isCacheSanityCheckEnabled()
lock(...) or lockAsync(...)
methods when entry is enlisted to transaction.These checks are not required for cache operation, but help to find subtle bugs. Disabling of this checks usually yields a noticeable performance gain.
If not provided, default value is DFLT_CACHE_SANITY_CHECK_ENABLED.
True if group lock sanity check is enabled.public void setCacheSanityCheckEnabled(boolean cacheSanityCheckEnabled)
cacheSanityCheckEnabled - True if cache sanity check is enabled.isCacheSanityCheckEnabled()@Nullable public int[] getIncludeEventTypes()
Note that by default all events in GridGain are disabled. 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. So it is highly recommended to enable only those events that your application logic requires. 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.
public void setIncludeEventTypes(int... inclEvtTypes)
GridEventStorageManager.record(GridEvent).
Note, that either the include event types or the exclude event types can be established.inclEvtTypes - Include event types.public void setRestJettyPath(String jettyPath)
GRIDGAIN_HOME, to JETTY
XML configuration file. JETTY is used to support REST over HTTP protocol for
accessing GridGain APIs remotely.jettyPath - Path to JETTY XML configuration file.public String getRestJettyPath()
GRIDGAIN_HOME, to Jetty
XML configuration file. Jetty is used to support REST over HTTP protocol for
accessing GridGain APIs remotely.
If not provided, Jetty instance with default configuration will be started picking
GridSystemProperties.GG_JETTY_HOST and GridSystemProperties.GG_JETTY_PORT
as host and port respectively.
JETTY XML configuration file.GridSystemProperties.GG_JETTY_HOST,
GridSystemProperties.GG_JETTY_PORTpublic void setRestEnabled(boolean restEnabled)
REST access is enabled or not.restEnabled - Flag indicating whether external REST access is enabled or not.public boolean isRestEnabled()
REST access is enabled or not. By default,
external REST access is turned on.REST access is enabled or not.GridSystemProperties.GG_JETTY_HOST,
GridSystemProperties.GG_JETTY_PORTpublic String getRestTcpHost()
If not defined, system-wide local address will be used
(see getLocalHost().
You can also use 0.0.0.0 value to bind to all
locally-available IP addresses.
public void setRestTcpHost(String restTcpHost)
restTcpHost - TCP host.public int getRestTcpPort()
Default is DFLT_TCP_PORT.
public void setRestTcpPort(int restTcpPort)
restTcpPort - TCP port.public boolean isRestTcpNoDelay()
TCP_NODELAY option should be set for accepted client connections.
Setting this option reduces network latency and should be set to true in majority of cases.
For more information, see Socket.setTcpNoDelay(boolean)
If not specified, default value is DFLT_TCP_NODELAY.TCP_NODELAY option should be enabled.public void setRestTcpNoDelay(boolean restTcpNoDelay)
TCP_NODELAY option should be set for all accepted client connections.restTcpNoDelay - True if option should be enabled.isRestTcpNoDelay()public boolean isRestTcpDirectBuffer()
public void setRestTcpDirectBuffer(boolean restTcpDirectBuf)
restTcpDirectBuf - True if option should be enabled.isRestTcpDirectBuffer()public int getRestTcpSendBufferSize()
public void setRestTcpSendBufferSize(int restTcpSndBufSize)
restTcpSndBufSize - Send buffer size.getRestTcpSendBufferSize()public int getRestTcpReceiveBufferSize()
public void setRestTcpReceiveBufferSize(int restTcpRcvBufSize)
restTcpRcvBufSize - Receive buffer size.getRestTcpReceiveBufferSize()public int getRestTcpSendQueueLimit()
public void setRestTcpSendQueueLimit(int restTcpSndQueueLimit)
restTcpSndQueueLimit - REST TCP server send queue limit (0 for unlimited).getRestTcpSendQueueLimit()public int getRestTcpSelectorCount()
public void setRestTcpSelectorCount(int restTcpSelectorCnt)
restTcpSelectorCnt - Number of selector threads for REST TCP server.getRestTcpSelectorCount()public long getRestIdleTimeout()
This setting is used to reject half-opened sockets. If no packets come within idle timeout, the connection is closed.
public void setRestIdleTimeout(long restIdleTimeout)
restIdleTimeout - Idle timeout in milliseconds.getRestIdleTimeout()public boolean isRestTcpSslEnabled()
Note that if this flag is set to true, an instance of GridSslContextFactory
should be provided, otherwise binary rest protocol will fail to start.
True if SSL should be enabled.public void setRestTcpSslEnabled(boolean restTcpSslEnabled)
true, then a valid instance of GridSslContextFactory
should be provided in GridConfiguration. Otherwise, TCP binary protocol will fail to start.restTcpSslEnabled - True if SSL should be enabled.public boolean isRestTcpSslClientAuth()
public void setRestTcpSslClientAuth(boolean needClientAuth)
needClientAuth - Whether or not client authentication is required.public GridSslContextFactory getRestTcpSslContextFactory()
GridSslContextFactorypublic void setRestTcpSslContextFactory(GridSslContextFactory restTcpSslCtxFactory)
GridSslContextFactory that will be used to create an instance of SSLContext
for Secure Socket Layer on TCP binary protocol. This factory will only be used if
setRestTcpSslEnabled(boolean) is set to true.restTcpSslCtxFactory - Instance of GridSslContextFactorypublic int getRestPortRange()
public void setRestPortRange(int restPortRange)
restPortRange - Port range.public String[] getRestAccessibleFolders()
By default, list consists of a single GRIDGAIN_HOME folder. If GRIDGAIN_HOME
could not be detected and property is not specified, no restrictions applied.
public void setRestAccessibleFolders(String... restAccessibleFolders)
restAccessibleFolders - Array of folder paths.public ExecutorService getRestExecutorService()
If not provided, new executor service will be created using the following configuration:
DFLT_REST_CORE_THREAD_CNTDFLT_REST_MAX_THREAD_CNTDFLT_REST_THREADPOOL_QUEUE_CAPpublic void setRestExecutorService(ExecutorService restExecSvc)
restExecSvc - Thread pool to use for processing of client messages.getRestExecutorService()public void setRestExecutorServiceShutdown(boolean restSvcShutdown)
restSvcShutdown - REST executor service shutdown flag.getRestExecutorService()public boolean getRestExecutorServiceShutdown()
If not provided, default value true will be used which will shutdown
executor service when GridGain stops regardless whether it was started before GridGain
or by GridGain.
public void setLocalHost(String locHost)
locHost - Local IP address or host to bind to.@Nullable public String getLocalHost()
If null then GridGain tries to use local wildcard address. That means that
all services will be available on all network interfaces of the host machine.
It is strongly recommended to set this parameter for all production environments.
If not provided, default is null.
public int getTimeServerPortBase()
[timeServerPortBase, timeServerPortBase + timeServerPortRange - 1].
Time server provides clock synchronization between nodes.
public void setTimeServerPortBase(int timeSrvPortBase)
timeSrvPortBase - Time server port base.public int getTimeServerPortRange()
public void setTimeServerPortRange(int timeSrvPortRange)
timeSrvPortRange - Time server port range.public void setRestSecretKey(@Nullable String restSecretKey)
null or empty authentication is disabled.restSecretKey - REST secret key.@Nullable public String getRestSecretKey()
null or empty authentication is disabled.GridSystemProperties.GG_JETTY_HOST,
GridSystemProperties.GG_JETTY_PORT@Nullable public String[] getIncludeProperties()
null, which is default, then all system and environment
properties will be included. If this array is empty, then none will be included.
Otherwise, for every name provided, first a system property will be looked up,
and then, if it is not found, environment property will be looked up.public void setIncludeProperties(String... includeProps)
getIncludeProperties() for more info.includeProps - Array of system or environment property names to include into node attributes.public long getMetricsLogFrequency()
If 0, metrics print out is disabled.
If not provided, then default value DFLT_METRICS_LOG_FREQ is used.
public void setMetricsLogFrequency(long metricsLogFreq)
If 0, metrics print out is disabled.
If not provided, then default value DFLT_METRICS_LOG_FREQ is used.
metricsLogFreq - Frequency of metrics log print out.@Nullable public GridClientMessageInterceptor getClientMessageInterceptor()
null then no interception will be applied.
Setting interceptor allows to transform all objects exchanged via REST protocol. For example if you use custom serialisation on client you can write interceptor to transform binary representations received from client to Java objects and later access them from java code directly.
Default value is null.
GridClientMessageInterceptorpublic void setClientMessageInterceptor(GridClientMessageInterceptor interceptor)
Setting interceptor allows to transform all objects exchanged via REST protocol. For example if you use custom serialisation on client you can write interceptor to transform binary representations received from client to Java objects and later access them from java code directly.
interceptor - Interceptor.@Nullable public GridGgfsConfiguration[] getGgfsConfiguration()
public void setGgfsConfiguration(GridGgfsConfiguration... ggfsCfg)
ggfsCfg - GGFS configurations.@Nullable public GridStreamerConfiguration[] getStreamerConfiguration()
public void setStreamerConfiguration(GridStreamerConfiguration... streamerCfg)
streamerCfg - Streamer configuration.@Nullable public GridDrReceiverHubConfiguration getDrReceiverHubConfiguration()
public void setDrReceiverHubConfiguration(GridDrReceiverHubConfiguration drRcvHubCfg)
drRcvHubCfg - Data center sender hub configuration.@Nullable public GridDrSenderHubConfiguration getDrSenderHubConfiguration()
public void setDrSenderHubConfiguration(GridDrSenderHubConfiguration drSndHubCfg)
drSndHubCfg - Data center receiver hub configuration.public byte getDataCenterId()
It is expected that data center ID will be unique among all the topologies participating in data center replication and the same for all the nodes that belong the given topology.
0 if it is not set.public void setDataCenterId(byte dataCenterId)
It is expected that data center ID will be unique among all the topologies participating in data center replication and the same for all the nodes that belong the given topology.
dataCenterId - Data center ID.public GridSecurityCredentialsProvider getSecurityCredentialsProvider()
public void setSecurityCredentialsProvider(GridSecurityCredentialsProvider securityCred)
securityCred - Security credentials.Copyright © 2014. All rights reserved.