public class GridKernal extends GridProjectionAdapter implements GridEx, GridKernalMBean
ctx| Constructor and Description |
|---|
GridKernal()
No-arg constructor is required by externalization.
|
GridKernal(GridSpringResourceContext rsrcCtx) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allEventsUserRecordable(int[] types)
Checks whether all provided events are user-recordable.
|
<K,V> GridCache<K,V> |
cache(String name)
Gets the cache instance for the given name, if one does not
exist
IllegalArgumentException will be thrown. |
Collection<GridCache<?,?>> |
caches()
Gets all configured caches.
|
Collection<GridCache<?,?>> |
cachesx(GridPredicate<? super GridCache<?,?>>[] p)
Gets configured cache instance that satisfy all provided predicates including non-public caches.
|
<K,V> GridCache<K,V> |
cachex()
Gets default cache instance if one is configured or null otherwise returning even non-public caches.
|
<K,V> GridCache<K,V> |
cachex(String name)
Gets the cache instance for the given name if one is configured or
null otherwise returning even non-public caches.
|
void |
close()
Closes
this instance of grid. |
Collection<String> |
compatibleVersions()
Gets list of compatible versions.
|
GridConfiguration |
configuration()
Gets the configuration of this grid instance.
|
GridKernalContext |
context()
It's intended for use by internal marshalling implementation only.
|
<K,V> GridDataLoader<K,V> |
dataLoader(String cacheName)
Gets a new instance of data loader associated with given cache name.
|
GridDr |
dr()
Gets an instance of Data Center Replication.
|
ExecutorService |
drPool()
Get DR pool.
|
boolean |
eventUserRecordable(int type)
Checks if the event type is user-recordable.
|
String |
executeTask(String taskName,
String arg)
A shortcut method that executes given task assuming single
java.lang.String argument
and java.lang.String return type. |
GridProjection |
forLocal()
Gets monadic projection consisting from the local node.
|
String |
getAuthenticationSpiFormatted()
Gets a formatted instance of fully configured authentication SPI implementation.
|
String |
getCheckpointSpiFormatted()
Gets a formatted instance of configured checkpoint SPI implementation.
|
String |
getCollisionSpiFormatted()
Gets a formatted instance of configured collision SPI implementations.
|
String |
getCommunicationSpiFormatted()
Gets a formatted instance of fully configured SPI communication implementation.
|
String |
getCopyright()
Gets copyright statement for GridGain product.
|
String |
getDeploymentSpiFormatted()
Gets a formatted instance of fully configured deployment SPI implementation.
|
String |
getDiscoverySpiFormatted()
Gets a formatted instance of configured discovery SPI implementation.
|
String |
getEventStorageSpiFormatted()
Gets a formatted instance of fully configured event SPI implementation.
|
String |
getExecutorServiceFormatted()
Gets a formatted instance of fully configured thread pool that is used in grid.
|
String |
getFailoverSpiFormatted()
Gets a formatted instance of fully configured failover SPI implementations.
|
String |
getFullVersion()
Gets string presentation of the version.
|
String |
getGridGainHome()
Gets GridGain installation home folder.
|
String |
getGridLoggerFormatted()
Gets a formatted instance of logger that is in grid.
|
String |
getInstanceName()
Gets optional kernal instance name.
|
String |
getJdkInformation()
Gets JDK information.
|
String |
getLicenseFilePath()
Gets file path of the license.
|
Collection<String> |
getLifecycleBeansFormatted()
Gets
toString() representation of of lifecycle beans configured
with GridGain. |
String |
getLoadBalancingSpiFormatted()
Gets a formatted instance of fully configured load balancing SPI implementations.
|
UUID |
getLocalNodeId()
Unique identifier for this node within grid.
|
String |
getMBeanServerFormatted()
Gets a formatted instance of MBean server instance.
|
String |
getOsInformation()
Gets OS information.
|
String |
getOsUser()
Gets OS user.
|
String |
getSecureSessionSpiFormatted()
Gets a formatted instance of fully configured secure session SPI implementation.
|
long |
getStartTimestamp()
Get start timestamp of the kernal.
|
String |
getStartTimestampFormatted()
Gets string presentation of the kernal start timestamp.
|
String |
getSwapSpaceSpiFormatted()
Gets a formatted instance of configured swapspace SPI implementations.
|
long |
getUpTime()
Gets up-time of the kernal.
|
String |
getUpTimeFormatted()
Gets string presentation of up-time for the kernal.
|
Collection<String> |
getUserAttributesFormatted()
Gets a collection of formatted user-defined attributes added to this node.
|
String |
getVmName()
Gets VM name.
|
GridGgfs |
ggfs(String name)
Gets an instance of GGFS - GridGain In-Memory File System, if one is not
configured then
IllegalArgumentException will be thrown. |
Collection<GridGgfs> |
ggfss()
Gets all instances of the grid file systems.
|
<K,V> GridCacheAdapter<K,V> |
internalCache()
USED ONLY FOR TESTING.
|
<K,V> GridCacheAdapter<K,V> |
internalCache(String name)
USED ONLY FOR TESTING.
|
boolean |
isJmxRemoteEnabled()
Whether or not remote JMX management is enabled for this node.
|
boolean |
isPeerClassLoadingEnabled()
Returns
true if peer class loading is enabled, false
otherwise. |
boolean |
isRestartEnabled()
Whether or not node restart is enabled.
|
boolean |
isSmtpEnabled()
Whether or not SMTP is configured.
|
long |
licenseGracePeriodLeft() |
GridNode |
localNode()
Gets local grid node.
|
GridLogger |
log()
Gets grid's logger.
|
<K> Map<GridNode,Collection<K>> |
mapKeysToNodes(String cacheName,
Collection<? extends K> keys)
This method provides ability to detect which cache keys are mapped to which nodes
on cache instance with given name.
|
<K> GridNode |
mapKeyToNode(String cacheName,
K key)
This method provides ability to detect which cache keys are mapped to which nodes
on cache instance with given name.
|
String |
name()
Gets the name of the grid this grid instance (and correspondingly its local node) belongs to.
|
<K,V> GridNodeLocalMap<K,V> |
nodeLocalMap()
Gets node-local storage instance.
|
boolean |
pingNode(String nodeId)
Pings node with given node ID to see whether it is alive.
|
boolean |
pingNode(UUID nodeId)
Pings a remote node.
|
boolean |
pingNodeByAddress(String host)
Pings node with given host name to see if it is alive.
|
GridProduct |
product()
Gets information about product as well as license management capabilities.
|
boolean |
removeCheckpoint(String key)
This method allows manually remove the checkpoint with given
key. |
void |
resetMetrics()
Resets local I/O, job, and task execution metrics.
|
void |
restartNodes()
Restarts nodes satisfying optional set of predicates.
|
void |
restartNodes(Collection<UUID> ids)
Restarts nodes defined by provided IDs.
|
GridScheduler |
scheduler()
Gets an instance of cron-based scheduler.
|
GridSecurity |
security()
Gets an instance of
GridSecurity interface. |
GridFuture<Boolean> |
sendAdminEmailAsync(String subj,
String body,
boolean html)
Schedule sending of given email to all configured admin emails.
|
void |
start(GridConfiguration cfg,
ExecutorService drPool,
GridAbsClosure errHnd) |
GridFuture<Collection<GridTuple3<String,Boolean,String>>> |
startNodes(Collection<Map<String,Object>> hosts,
Map<String,Object> dflts,
boolean restart,
int timeout,
int maxConn)
Starts one or more nodes on remote host(s).
|
GridFuture<Collection<GridTuple3<String,Boolean,String>>> |
startNodes(File file,
boolean restart,
int timeout,
int maxConn)
Starts one or more nodes on remote host(s).
|
void |
stop(boolean cancel)
Stops grid instance.
|
void |
stopNodes()
Stops nodes satisfying optional set of predicates.
|
void |
stopNodes(Collection<UUID> ids)
Stops nodes defined by provided IDs.
|
GridStreamer |
streamer(String name)
Gets an instance of streamer by name, if one does not exist then
IllegalArgumentException will be thrown. |
Collection<GridStreamer> |
streamers()
Gets all instances of streamers.
|
Collection<GridNode> |
topology(long topVer)
Gets a topology by version.
|
long |
topologyVersion()
Gets current topology version.
|
String |
toString() |
void |
undeployTaskFromGrid(String taskName)
Makes the best attempt to undeploy a task from the whole grid.
|
compute, events, forAttribute, forCache, forDaemons, forHost, forNode, forNodeId, forNodeIds, forNodes, forOthers, forOthers, forPredicate, forRandom, forRemotes, forStreamer, forSubjectId, grid, guard, lightCheck, message, metrics, node, node, nodes, predicate, readExternal, readResolve, setKernalContext, unguard, writeExternaladdMeta, addMetaIfAbsent, addMetaIfAbsent, allMeta, clone, copyMeta, copyMeta, hasMeta, hasMeta, meta, putMetaIfAbsent, putMetaIfAbsent, readExternalMeta, removeMeta, removeMeta, replaceMeta, writeExternalMetaequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforSubjectIdcompute, events, forAttribute, forCache, forDaemons, forHost, forNode, forNodeId, forNodeIds, forNodes, forOthers, forOthers, forPredicate, forRandom, forRemotes, forStreamer, grid, message, metrics, node, node, nodes, predicatepublic GridKernal()
public GridKernal(@Nullable GridSpringResourceContext rsrcCtx)
rsrcCtx - Optional Spring application context.public String name()
If default grid instance is used, then
null is returned. Refer to GridGain documentation
for information on how to start named grids.
public String getCopyright()
getCopyright in interface GridKernalMBeanpublic String getLicenseFilePath()
getLicenseFilePath in interface GridKernalMBeanpublic long getStartTimestamp()
getStartTimestamp in interface GridKernalMBeanpublic String getStartTimestampFormatted()
getStartTimestampFormatted in interface GridKernalMBeanpublic long getUpTime()
getUpTime in interface GridKernalMBeanpublic String getUpTimeFormatted()
getUpTimeFormatted in interface GridKernalMBeanpublic String getFullVersion()
getFullVersion in interface GridKernalMBeanpublic String getCheckpointSpiFormatted()
getCheckpointSpiFormatted in interface GridKernalMBeanpublic String getSwapSpaceSpiFormatted()
getSwapSpaceSpiFormatted in interface GridKernalMBeanpublic String getCommunicationSpiFormatted()
getCommunicationSpiFormatted in interface GridKernalMBeanpublic String getDeploymentSpiFormatted()
getDeploymentSpiFormatted in interface GridKernalMBeanpublic String getDiscoverySpiFormatted()
getDiscoverySpiFormatted in interface GridKernalMBeanpublic String getEventStorageSpiFormatted()
getEventStorageSpiFormatted in interface GridKernalMBeanpublic String getCollisionSpiFormatted()
getCollisionSpiFormatted in interface GridKernalMBeanpublic String getFailoverSpiFormatted()
getFailoverSpiFormatted in interface GridKernalMBeanpublic String getLoadBalancingSpiFormatted()
getLoadBalancingSpiFormatted in interface GridKernalMBeanpublic String getAuthenticationSpiFormatted()
getAuthenticationSpiFormatted in interface GridKernalMBeanpublic String getSecureSessionSpiFormatted()
getSecureSessionSpiFormatted in interface GridKernalMBeanpublic String getOsInformation()
getOsInformation in interface GridKernalMBeanpublic String getJdkInformation()
getJdkInformation in interface GridKernalMBeanpublic String getOsUser()
getOsUser in interface GridKernalMBeanpublic String getVmName()
getVmName in interface GridKernalMBeanpublic String getInstanceName()
null.getInstanceName in interface GridKernalMBeanpublic String getExecutorServiceFormatted()
getExecutorServiceFormatted in interface GridKernalMBeanpublic String getGridGainHome()
getGridGainHome in interface GridKernalMBeanpublic String getGridLoggerFormatted()
getGridLoggerFormatted in interface GridKernalMBeanpublic String getMBeanServerFormatted()
getMBeanServerFormatted in interface GridKernalMBeanpublic UUID getLocalNodeId()
getLocalNodeId in interface GridKernalMBeanpublic Collection<String> getUserAttributesFormatted()
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.
getUserAttributesFormatted in interface GridKernalMBeanpublic boolean isPeerClassLoadingEnabled()
true if peer class loading is enabled, false
otherwise. Default value is true.
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.
isPeerClassLoadingEnabled in interface GridKernalMBeantrue if peer class loading is enabled, false
otherwise.public Collection<String> getLifecycleBeansFormatted()
toString() representation of of lifecycle beans configured
with GridGain.getLifecycleBeansFormatted in interface GridKernalMBeantoString() representation of all lifecycle beans configured
with GridGain.public void start(GridConfiguration cfg, @Nullable ExecutorService drPool, GridAbsClosure errHnd) throws GridException
cfg - Grid configuration to use.drPool - Dr executor service.errHnd - Error handler to use for notification about startup problems.GridException - Thrown in case of any errors.public void stop(boolean cancel)
cancel - Whether or not to cancel running jobs.public <K,V> GridCacheAdapter<K,V> internalCache()
K - Key type.V - Value type.public <K,V> GridCacheAdapter<K,V> internalCache(@Nullable String name)
K - Key type.V - Value type.name - Cache name.public GridKernalContext context()
public boolean isJmxRemoteEnabled()
com.sun.management.jmxremoteisJmxRemoteEnabled in interface GridExTrue if remote JMX management is enabled - false otherwise.public boolean isRestartEnabled()
bin/ggstart.{sh|bat} script using -r argument. Node can be
programmatically restarted using GridGain.restart(boolean)} method.isRestartEnabled in interface GridExTrue if restart mode is enabled, false otherwise.GridGain.restart(boolean)public boolean isSmtpEnabled()
GridConfiguration.getSmtpHost().
If SMTP is not configured all emails notifications will be disabled.
isSmtpEnabled in interface GridExTrue if SMTP is configured - false otherwise.GridConfiguration.getSmtpFromEmail(),
GridConfiguration.getSmtpHost(),
GridConfiguration.getSmtpPassword(),
GridConfiguration.getSmtpPort(),
GridConfiguration.getSmtpUsername(),
GridConfiguration.isSmtpSsl(),
GridConfiguration.isSmtpStartTls(),
sendAdminEmailAsync(String, String, boolean)public GridConfiguration configuration()
NOTE:
SPIs obtains through this method should never be used directly. SPIs provide
internal view on the subsystem and is used internally by GridGain kernal. In rare use cases when
access to a specific implementation of this SPI is required - an instance of this SPI can be obtained
via this method to check its configuration properties or call other non-SPI
methods.
configuration in interface Gridpublic GridLogger log()
public boolean removeCheckpoint(String key)
key.removeCheckpoint in interface GridKernalMBeankey - Checkpoint key.true if specified checkpoint was indeed removed, false
otherwise.public boolean pingNode(String nodeId)
pingNode in interface GridKernalMBeannodeId - String presentation of node ID. See UUID.fromString(String) for
details on string formatting.public Collection<GridNode> topology(long topVer)
null if topology history storage doesn't contain
specified topology version (history currently keeps last 1000 snapshots).public long topologyVersion()
GridTcpDiscoverySpi) topology versions
are sequential - they start from '1' and get incremented every time whenever a
node joins or leaves. For other discovery SPIs topology versions may not be (and likely are
not) sequential.topologyVersion in interface Gridpublic void undeployTaskFromGrid(String taskName) throws JMException
Note that GridGain maintains internal versions for grid tasks in case of redeployment. This method will attempt to undeploy all versions on the grid task with given name.
undeployTaskFromGrid in interface GridKernalMBeantaskName - Name of the task to undeploy. If task class has GridComputeTaskName annotation,
then task was deployed under a name specified within annotation. Otherwise, full
class name should be used as task's name.JMException - Thrown if undeploy failed.public String executeTask(String taskName, String arg) throws JMException
java.lang.String argument
and java.lang.String return type.executeTask in interface GridKernalMBeantaskName - Name of the task to execute.arg - Single task execution argument (can be null).java.lang.String type).JMException - Thrown in case when execution failed.public GridFuture<Boolean> sendAdminEmailAsync(String subj, String body, boolean html)
Note that this method returns immediately with the future and all emails will be sent asynchronously in a different thread. If email queue is full or sending has failed - the email will be lost. Email queue can fill up if rate of scheduling emails is greater than the rate of SMTP sending.
Implementation is not performing any throttling and it is responsibility of the caller to properly throttle the emails, if necessary.
sendAdminEmailAsync in interface GridExsubj - Subject of the email.body - Body of the email.html - If true the email body will have MIME html subtype.true email was successfully sent. In all
other cases - sending process has failed.isSmtpEnabled(),
GridConfiguration.getAdminEmails()public boolean pingNodeByAddress(String host)
pingNodeByAddress in interface GridKernalMBeanhost - Host name or IP address of the node to ping.public GridNode localNode()
public <K,V> GridNodeLocalMap<K,V> nodeLocalMap()
Node-local values are similar to thread locals in a way that these values are not distributed and kept only on local node (similar like thread local values are attached to the current thread only). Node-local values are used primarily by closures executed from the remote nodes to keep intermediate state on the local node between executions.
There's only one instance of node local storage per local node. Node local storage is
based on ConcurrentMap and is safe for multi-threaded access.
nodeLocalMap in interface Gridpublic boolean pingNode(UUID nodeId)
Discovery SPIs usually have some latency in discovering failed nodes. Hence, communication to remote nodes may fail at times if an attempt was made to establish communication with a failed node. This method can be used to check if communication has failed due to node failure or due to some other reason.
pingNode in interface GridnodeId - ID of a node to ping.true if node for a given ID is alive, false otherwise.GridDiscoverySpipublic GridFuture<Collection<GridTuple3<String,Boolean,String>>> startNodes(File file, boolean restart, int timeout, int maxConn) throws GridException
This method takes INI file which defines all startup parameters. It can contain one or
more sections, each for a host or for range of hosts (note that they must have different
names) and a special 'defaults' section with default values. They are applied to
undefined parameters in host's sections.
Returned result is collection of tuples. Each tuple corresponds to one node start attempt and contains hostname, success flag and error message if attempt was not successful. Note that successful attempt doesn't mean that node was actually started and joined topology. For large topologies (> 100s nodes) it can take over 10 minutes for all nodes to start. See individual node logs for details.
startNodes in interface Gridfile - Configuration file.restart - Whether to stop existing nodes. If true, all existing
nodes on the host will be stopped before starting new ones. If
false, nodes will be started only if there are less
nodes on the host than expected.timeout - Connection timeout.maxConn - Number of parallel SSH connections to one host.GridException - In case of error.public GridFuture<Collection<GridTuple3<String,Boolean,String>>> startNodes(Collection<Map<String,Object>> hosts, @Nullable Map<String,Object> dflts, boolean restart, int timeout, int maxConn) throws GridException
Each map in hosts collection
defines startup parameters for one host or for a range of hosts. The following
parameters are supported:
| Name | Type | Description |
|---|---|---|
| host | String |
Hostname (required). Can define several hosts if their IPs are sequential.
E.g., 10.0.0.1~5 defines range of five IP addresses. Other
parameters are applied to all hosts equally.
|
| port | Integer | Port number (default is 22). |
| uname | String | Username (if not defined, current local username will be used). |
| passwd | String | Password (if not defined, private key file must be defined). |
| key | File | Private key file (if not defined, password must be defined). |
| nodes | Integer |
Expected number of nodes on the host. If some nodes are started
already, then only remaining nodes will be started. If current count of
nodes is equal to this number, and restart flag is false,
then nothing will happen.
|
| ggHome | String | Path to GridGain installation folder. If not defined, GRIDGAIN_HOME environment variable must be set on remote hosts. |
| cfg | String | Path to configuration file (relative to ggHome). |
| script | String |
Custom startup script file name and path (relative to ggHome).
You can also specify a space-separated list of parameters in the same
string (for example: "bin/my-custom-script.sh -v").
|
dflts map defines default values. They are applied to undefined parameters in
hosts collection.
Returned result is collection of tuples. Each tuple corresponds to one node start attempt and contains hostname, success flag and error message if attempt was not successful. Note that successful attempt doesn't mean that node was actually started and joined topology. For large topologies (> 100s nodes) it can take over 10 minutes for all nodes to start. See individual node logs for details.
startNodes in interface Gridhosts - Startup parameters.dflts - Default values.restart - Whether to stop existing nodes. If true, all existing
nodes on the host will be stopped before starting new ones. If
false, nodes will be started only if there are less
nodes on the host than expected.timeout - Connection timeout in milliseconds.maxConn - Number of parallel SSH connections to one host.GridException - In case of error.@Nullable public ExecutorService drPool()
public void stopNodes()
throws GridException
NOTE: System.exit(GridGain.KILL_EXIT_CODE) will be executed on each
stopping node. If you have other applications running in the same JVM along with GridGain,
those applications will be stopped as well.
stopNodes in interface GridGridException - In case of error.public void stopNodes(Collection<UUID> ids) throws GridException
NOTE: System.exit(GridGain.KILL_EXIT_CODE) will be executed on each
stopping node. If you have other applications running in the same JVM along with GridGain,
those applications will be stopped as well.
stopNodes in interface Gridids - IDs defining nodes to stop.GridException - In case of error.public void restartNodes()
throws GridException
NOTE: this command only works for grid nodes started with GridGain
ggstart.sh or ggstart.bat scripts.
restartNodes in interface GridGridException - In case of error.public void restartNodes(Collection<UUID> ids) throws GridException
NOTE: this command only works for grid nodes started with GridGain
ggstart.sh or ggstart.bat scripts.
restartNodes in interface Gridids - IDs defining nodes to restart.GridException - In case of error.public boolean eventUserRecordable(int type)
eventUserRecordable in interface GridExtype - Event type to check.true if passed event should be recorded, false - otherwise.public boolean allEventsUserRecordable(int[] types)
Note that this method supports only predefined GridGain events.
allEventsUserRecordable in interface GridExtypes - Event types.public <K,V> GridCache<K,V> cache(@Nullable String name)
IllegalArgumentException will be thrown.
Note that in case named cache instance is used as GGFS data or meta cache, IllegalStateException
will be thrown.cache in interface GridK - Key type.V - Value type.name - Cache name.GridGgfsConfiguration,
GridGgfsConfiguration.getDataCacheName(),
GridGgfsConfiguration.getMetaCacheName()public Collection<GridCache<?,?>> caches()
caches in interface GridGridGgfsConfiguration,
GridGgfsConfiguration.getDataCacheName(),
GridGgfsConfiguration.getMetaCacheName()public <K,V> GridCache<K,V> cachex(@Nullable String name)
public <K,V> GridCache<K,V> cachex()
GridCacheProjection.name() method on default instance returns null.public Collection<GridCache<?,?>> cachesx(GridPredicate<? super GridCache<?,?>>[] p)
public <K,V> GridDataLoader<K,V> dataLoader(@Nullable String cacheName)
GridDataLoader documentation.dataLoader in interface GridcacheName - Cache name (null for default cache).public GridGgfs ggfs(String name)
IllegalArgumentException will be thrown.
GGFS is fully compliant with Hadoop FileSystem APIs and can
be plugged into Hadoop installations. For more information refer to
documentation on Hadoop integration shipped with GridGain.
public Collection<GridGgfs> ggfss()
public <K> Map<GridNode,Collection<K>> mapKeysToNodes(String cacheName, @Nullable Collection<? extends K> keys) throws GridException
This method works as following:
GridCacheAffinityFunction is
used to determine which keys are mapped to which groups of nodes.
mapKeysToNodes in interface GridcacheName - Cache name, if null, then default cache instance is used.keys - Cache keys to map to nodes.GridException - If failed to map cache keys.@Nullable public <K> GridNode mapKeyToNode(String cacheName, K key) throws GridException
This method works as following:
GridCacheAffinityFunction
is returned.
mapKeyToNode in interface GridcacheName - Cache name, if null, then default cache instance is used.key - Cache key to map to a node.null if cache with given name
is not present in the grid.GridException - If failed to map key.public void resetMetrics()
resetMetrics in interface Gridpublic GridStreamer streamer(@Nullable String name)
IllegalArgumentException will be thrown.public Collection<GridStreamer> streamers()
public GridProjection forLocal()
public GridProduct product()
public GridScheduler scheduler()
public GridSecurity security()
GridSecurity interface. Available in enterprise edition only.public GridDr dr()
public Collection<String> compatibleVersions()
compatibleVersions in interface GridExpublic long licenseGracePeriodLeft()
licenseGracePeriodLeft in interface GridEx-1 otherwise.public void close()
throws GridException
this instance of grid. This method is identical to calling
G.stop(gridName, true).
The method is invoked automatically on objects managed by the
try-with-resources statement.
close in interface AutoCloseableclose in interface GridGridException - If failed to stop grid.Copyright © 2014. All rights reserved.