|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
@Apache20LicenseCompatible public interface GridConfiguration
This interface defines grid runtime configuration. This configuration is passed to
GridFactory.start(GridConfiguration) method. It defines all configuration
parameters required to start a grid instance. Usually, a special
class called "loader" will create an instance of this interface and call
GridFactory.start(GridConfiguration) method to initialize GridGain instance.
Note, that absolutely every configuration property in GridConfiguration is optional.
Once can simply create new instance of GridConfigurationAdapter, for example,
and pass it to GridFactory.start(GridConfiguration) to start grid with
default configuration. See GridFactory documentation for information about
default configuration properties used and more information on how to start grid.
For more information about grid configuration and startup refer to GridFactory
documentation which includes description and default values for every configuration
property.
See Also:
Documentation
Email Support
Online Forums
Issue Tracking
Author: 2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Field Summary | |
|---|---|
static GridDeploymentMode |
DFLT_DEPLOYMENT_MODE
Default deployment mode (value is GridDeploymentMode.PRIVATE). |
static long |
DFLT_DISCOVERY_STARTUP_DELAY
Default discovery startup delay in milliseconds (value is 60,000ms). |
static long |
DFLT_METRICS_EXPIRE_TIME
Default metrics expire time. |
static int |
DFLT_METRICS_HISTORY_SIZE
Default metrics history size (value is 10000). |
static boolean |
DFLT_PEER_CLASS_LOADING_ENABLED
Default flag for peer class loading. |
static int |
DFLT_PEER_CLASS_LOADING_MISSED_RESROUCES_CACHE_SIZE
Default cache size for missed resources. |
static long |
DFLT_PEER_CLASS_LOADING_TIMEOUT
Default maximum peer class loading timeout in milliseconds (value is 2,000ms). |
| Method Summary | |
|---|---|
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. |
ExecutorService |
getExecutorService()
Should return an instance of fully configured thread pool to be used in grid. |
GridFailoverSpi[] |
getFailoverSpi()
Should return fully configured failover SPI implementation. |
String |
getGridGainHome()
Should return GridGain installation home folder. |
GridLogger |
getGridLogger()
Should return an instance of logger to use in grid. |
String |
getGridName()
Gets optional name of this grid instance. |
Collection<? extends GridLifecycleBean> |
getLifecycleBeans()
Returns a collection of life-cycle beans. |
GridLoadBalancingSpi[] |
getLoadBalancingSpi()
Should return fully configured load balancing SPI implementation. |
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 metrics are considered expired. |
int |
getMetricsHistorySize()
Number of metrics to keep in memory to calculate totals and averages. |
GridLocalMetricsSpi |
getMetricsSpi()
Should return fully configured metrics SPI implementation. |
UUID |
getNodeId()
Unique identifier for this node within grid. |
List<String> |
getP2PLocalClassPathExclude()
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. |
int |
getPeerClassLoadingMissedResourcesCacheSize()
Returns missed resources cache size. |
long |
getPeerClassLoadingTimeout()
Maximum timeout in milliseconds to wait for class-loading responses from remote nodes. |
ExecutorService |
getSystemExecutorService()
Should return an instance of fully configured executor service that is in charge of processing GridTaskSession requests and user messages
sent via Grid.sendMessage(GridNode, Serializable) method. |
GridTopologySpi[] |
getTopologySpi()
Should return fully configured topology SPI implementation. |
GridTracingSpi[] |
getTracingSpi()
Should return fully configured tracing SPI implementation. |
Map<String,? extends Serializable> |
getUserAttributes()
Should return any user-defined attributes to be added to this node. |
boolean |
isPeerClassLoadingEnabled()
Returns true if peer class loading is enabled, false otherwise. |
| Field Detail |
|---|
static final boolean DFLT_PEER_CLASS_LOADING_ENABLED
static final int DFLT_METRICS_HISTORY_SIZE
static final long DFLT_METRICS_EXPIRE_TIME
Long.MAX_VALUE which
means that metrics never expire.
static final long DFLT_PEER_CLASS_LOADING_TIMEOUT
static final long DFLT_DISCOVERY_STARTUP_DELAY
static final GridDeploymentMode DFLT_DEPLOYMENT_MODE
GridDeploymentMode.PRIVATE).
static final int DFLT_PEER_CLASS_LOADING_MISSED_RESROUCES_CACHE_SIZE
| Method Detail |
|---|
String getGridName()
Map<String,? extends Serializable> getUserAttributes()
GridNode.getAttribute(String) or
GridNode.getAttributes() methods.
Note that system adds the following attributes automatically (so you don't have to add them manually):
System.getProperties() - All system properties.System.getenv(String) - All environment properties.Grid.getName()).GridSpi.getName().
GridSpi.getName().
Note that grid will add all System properties and environment properties to grid node attributes also. SPI's may also add node attributes that are used for SPI implementation.
NOTE: attributes names starting with org.gridgain are reserved for internal use.
GridLogger getGridLogger()
GridFactory for information on default configuration.
GridMarshaller getMarshaller()
GridFactory for information on default configuration.
ExecutorService getExecutorService()
GridTasks
and GridJobs.
If not provided, default value will be used. See GridFactory for
information on default configuration.
ExecutorService getSystemExecutorService()
GridTaskSession requests and user messages
sent via Grid.sendMessage(GridNode, Serializable) method.
If not provided, default value will be used. See GridFactory for
information on default configuration.
ExecutorService getPeerClassLoadingExecutorService()
If not provided, default value will be used. See GridFactory for
information on default configuration.
String getGridGainHome()
MBeanServer getMBeanServer()
ManagementFactory.getPlatformMBeanServer()UUID getNodeId()
GridFactory for information on default configuration.
boolean isPeerClassLoadingEnabled()
GridConfiguration.DFLT_PEER_CLASS_LOADING_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.
List<String> getP2PLocalClassPathExclude()
int getMetricsHistorySize()
GridConfiguration.DFLT_METRICS_HISTORY_SIZE is used.
long getMetricsExpireTime()
GridConfiguration.DFLT_METRICS_EXPIRE_TIME is used.
long getPeerClassLoadingTimeout()
ClassNotFoundException
will be thrown.
If not provided (value is 0), then default value
GridConfiguration.DFLT_PEER_CLASS_LOADING_TIMEOUT is used.
Collection<? extends GridLifecycleBean> getLifecycleBeans()
GridLifecycleBean,
GridLifecycleEventTypeGridDiscoverySpi getDiscoverySpi()
GridFactory for information on default configuration.
GridCommunicationSpi getCommunicationSpi()
GridFactory for information on default configuration.
GridEventStorageSpi getEventStorageSpi()
GridFactory for information on default configuration.
GridCollisionSpi getCollisionSpi()
GridFactory for information on default configuration.
GridLocalMetricsSpi getMetricsSpi()
GridFactory for information on default configuration.
GridDeploymentSpi getDeploymentSpi()
GridFactory for information on default configuration.
GridCheckpointSpi[] getCheckpointSpi()
GridFactory for information on default configuration.
GridFailoverSpi[] getFailoverSpi()
GridFactory for information on default configuration.
GridTopologySpi[] getTopologySpi()
GridFactory for information on default configuration.
GridLoadBalancingSpi[] getLoadBalancingSpi()
GridFactory for information on default configuration.
GridTracingSpi[] getTracingSpi()
long getDiscoveryStartupDelay()
During startup, it is possible for some SPI's, such as GridMuleDiscoverySpi or GridJmsDiscoverySpi, 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 or some Mule messaging protocols 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.
GridDeploymentMode getDeploymentMode()
GridDeploymentMode documentation for more information.
int getPeerClassLoadingMissedResourcesCacheSize()
|
GridGain 2.1.0
Java API Specification |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
|
GridGain - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved. |
|
|