GridGain™ 3.6.0e
Enterprise Edition

org.gridgain.grid
Class GridFactory

java.lang.Object
  extended by org.gridgain.grid.GridFactory
Direct Known Subclasses:
G

public class GridFactory
extends Object

This class defines a factory for the main GridGain API. It controls Grid life cycle and allows listening for grid events.

Grid Loaders

Although user can apply grid factory directly to start and stop grid, grid is often started and stopped by grid loaders. Some examples of Grid loaders are:

Examples

Use GridFactory.start() method to start grid with default configuration. You can also use GridConfigurationAdapter to override some default configuration. Below is an example on how to start grid with URI deployment.
 GridConfigurationAdapter cfg = new GridConfigurationAdapter();

 GridUriDeployment deploySpi = new GridUriDeployment();

 deploySpi.setUriList(Collections.singletonList("classes://tmp/output/classes"));

 cfg.setDeploymentSpi(deploySpi);

 GridFactory.start(cfg);
 
Here is how a grid instance can be configured from Spring XML configuration file. The example below configures a grid instance with additional user attributes (see GridNode.attributes()) and specifies a grid name:
 <bean id="grid.cfg" class="org.gridgain.grid.GridConfigurationAdapter" scope="singleton">
     ...
     <property name="gridName" value="grid"/>
     <property name="userAttributes">
         <map>
             <entry key="group" value="worker"/>
             <entry key="grid.node.benchmark">
                 <bean class="org.gridgain.grid.benchmarks.GridLocalNodeBenchmark" init-method="start"/>
             </entry>
         </map>
     </property>
     ...
 </bean>
 
A grid instance with Spring configuration above can be started as following. Note that you do not need to pass path to Spring XML file if you are using GRIDGAIN_HOME/config/default-spring.xml. Also note, that the path can be absolute or relative to GRIDGAIN_HOME.
 ...
 G.start("/path/to/spring/xml/file.xml");
 ...
 
You can also instantiate grid directly from Spring without using GridFactory. For more information refer to GridSpringBean documentation.

Wiki & Forum:


Wiki
Forum

 

Field Summary
static int KILL_EXIT_CODE
          This is kill code that can be used by external tools, like Shell scripts, to auto-stop the GridGain JVM process without restarting.
static int RESTART_EXIT_CODE
          This is restart code that can be used by external tools, like Shell scripts, to auto-restart the GridGain JVM process.
 
Constructor Summary
protected GridFactory()
          Enforces singleton.
 
Method Summary
static void addListener(GridFactoryListener lsnr)
          Adds a lsnr for grid life cycle events.
static List<Grid> allGrids()
          Gets a list of all grids started so far.
static Grid grid()
          Gets an instance of default no-name grid.
static Grid grid(String name)
          Gets an named grid instance.
static Grid grid(UUID localNodeId)
          Gets a grid instance for given local node ID.
static void in(org.springframework.context.ApplicationContext ctx, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static void in(GridConfiguration cfg, org.springframework.context.ApplicationContext ctx, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static void in(GridConfiguration cfg, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static void in(GridInClosure<Grid>... ps)
          Automatically starts default grid, executes provided closures and stop the grid.
static void in(String springCfgPath, org.springframework.context.ApplicationContext ctx, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static void in(String springCfgPath, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static void in(URL springCfgUrl, org.springframework.context.ApplicationContext ctx, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static void in(URL springCfgUrl, GridInClosure<Grid>... ps)
          Automatically starts specified grid, executes provided closures and stop the grid.
static boolean isDaemon()
          Gets daemon flag.
static void kill(boolean cancel, boolean wait)
          Stops all started grids.
static boolean removeListener(GridFactoryListener lsnr)
          Removes lsnr added by GridFactory.addListener(GridFactoryListener) method.
static void restart(boolean cancel, boolean wait)
          Restarts all started grids.
static void setDaemon(boolean daemon)
          Sets daemon flag.
static Grid start()
          Starts grid with default configuration.
static Grid start(org.springframework.context.ApplicationContext springCtx)
          Starts grid with default configuration.
static Grid start(GridConfiguration cfg)
          Starts grid with given configuration.
static Grid start(GridConfiguration cfg, org.springframework.context.ApplicationContext springCtx)
          Starts grid with given configuration.
static Grid start(String springCfgPath)
          Starts all grids specified within given Spring XML configuration file.
static Grid start(String springCfgPath, org.springframework.context.ApplicationContext ctx)
          Starts all grids specified within given Spring XML configuration file.
static Grid start(URL springCfgUrl)
          Starts all grids specified within given Spring XML configuration file URL.
static Grid start(URL springCfgUrl, org.springframework.context.ApplicationContext ctx)
          Starts all grids specified within given Spring XML configuration file URL.
static GridFactoryState state()
          Gets state of grid default grid.
static GridFactoryState state(String name)
          Gets states of named grid.
static boolean stop(boolean cancel)
          Stops default grid.
static boolean stop(boolean cancel, boolean wait)
          Stops default grid.
static boolean stop(String name, boolean cancel)
          Stops named grid.
static boolean stop(String name, boolean cancel, boolean wait)
          Stops named grid.
static void stopAll(boolean cancel)
          Stops all started grids.
static void stopAll(boolean cancel, boolean wait)
          Stops all started grids.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESTART_EXIT_CODE

public static final int RESTART_EXIT_CODE
This is restart code that can be used by external tools, like Shell scripts, to auto-restart the GridGain JVM process. Note that there is no standard way for a JVM to restart itself from Java application and therefore we rely on external tools to provide that capability.

Note that standard ggstart.{sh|bat} scripts support restarting when JVM process exits with this code.

See Also:
Constant Field Values

KILL_EXIT_CODE

public static final int KILL_EXIT_CODE
This is kill code that can be used by external tools, like Shell scripts, to auto-stop the GridGain JVM process without restarting.

See Also:
Constant Field Values
Constructor Detail

GridFactory

protected GridFactory()
Enforces singleton.

Method Detail

setDaemon

public static void setDaemon(boolean daemon)
Sets daemon flag.

If daemon flag it set then all grid instances created by the factory will be daemon, i.e. the local node for these instances will be a daemon node. Note that if daemon flag is set - it will override the same settings in GridConfiguration.isDaemon(). Note that you can set on and off daemon flag at will.

Parameters:
daemon - Daemon flag to set.

isDaemon

public static boolean isDaemon()
Gets daemon flag.

If daemon flag it set then all grid instances created by the factory will be daemon, i.e. the local node for these instances will be a daemon node. Note that if daemon flag is set - it will override the same settings in GridConfiguration.isDaemon(). Note that you can set on and off daemon flag at will.

Returns:
Daemon flag.

state

public static GridFactoryState state()
Gets state of grid default grid.

Returns:
Default grid state.

state

public static GridFactoryState state(@Nullable
                                     String name)
Gets states of named grid. If name is null, then state of default no-name grid is returned.

Parameters:
name - Grid name. If name is null, then state of default no-name grid is returned.
Returns:
Grid state.

stop

public static boolean stop(boolean cancel)
Stops default grid. This method is identical to G.stop(null,cancel) apply. Note that method does not wait for all tasks to be completed.

Parameters:
cancel - If true then all jobs currently executing on default grid will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution
Returns:
true if default grid instance was indeed stopped, false otherwise (if it was not started).

stop

public static boolean stop(boolean cancel,
                           boolean wait)
Stops default grid. This method is identical to G.stop(null,cancel,wait) apply. If wait parameter is set to true then it will wait for all tasks to be finished.

Parameters:
cancel - If true then all jobs currently executing on default grid will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution.
wait - If true then method will wait for all tasks being executed until they finish their execution.
Returns:
true if default grid instance was indeed stopped, false otherwise (if it was not started).

stop

public static boolean stop(@Nullable
                           String name,
                           boolean cancel)
Stops named grid. If cancel flag is set to true then all jobs currently executing on local node will be interrupted. If grid name is null, then default no-name grid will be stopped. It does not wait for the tasks to finish their execution.

Parameters:
name - Grid name. If null, then default no-name grid will be stopped.
cancel - If true then all jobs currently will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution. If false, then jobs currently running will not be canceled. In either case, grid node will wait for completion of all jobs running on it before stopping.
Returns:
true if named grid instance was indeed found and stopped, false otherwise (the instance with given name was not found).

stop

public static boolean stop(@Nullable
                           String name,
                           boolean cancel,
                           boolean wait)
Stops named grid. If cancel flag is set to true then all jobs currently executing on local node will be interrupted. If grid name is null, then default no-name grid will be stopped. If wait parameter is set to true then grid will wait for all tasks to be finished.

Parameters:
name - Grid name. If null, then default no-name grid will be stopped.
cancel - If true then all jobs currently will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution. If false, then jobs currently running will not be canceled. In either case, grid node will wait for completion of all jobs running on it before stopping.
wait - If true then method will wait for all tasks being executed until they finish their execution.
Returns:
true if named grid instance was indeed found and stopped, false otherwise (the instance with given name was not found).

stopAll

public static void stopAll(boolean cancel)
Stops all started grids. If cancel flag is set to true then all jobs currently executing on local node will be interrupted. It does not wait for the tasks to finish their execution.

Note: it is usually safer and more appropriate to stop grid instances individually instead of blanket operation. In most cases, the party that started the grid instance should be responsible for stopping it.

Parameters:
cancel - If true then all jobs currently executing on all grids will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution

stopAll

public static void stopAll(boolean cancel,
                           boolean wait)
Stops all started grids. If cancel flag is set to true then all jobs currently executing on local node will be interrupted. If wait parameter is set to true then grid will wait for all tasks to be finished.

Note: it is usually safer and more appropriate to stop grid instances individually instead of blanket operation. In most cases, the party that started the grid instance should be responsible for stopping it.

Parameters:
cancel - If true then all jobs currently executing on all grids will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution
wait - If true then method will wait for all tasks being executed until they finish their execution.

restart

public static void restart(boolean cancel,
                           boolean wait)
Restarts all started grids. If cancel flag is set to true then all jobs currently executing on the local node will be interrupted. If wait parameter is set to true then grid will wait for all tasks to be finished.

Note: it is usually safer and more appropriate to stop grid instances individually instead of blanket operation. In most cases, the party that started the grid instance should be responsible for stopping it.

Note also that restarting functionality only works with the tools that specifically support GridGain's protocol for restarting. Currently only standard ggstart.{sh|bat} scripts support restarting of JVM GridGain's process.

Parameters:
cancel - If true then all jobs currently executing on all grids will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution.
wait - If true then method will wait for all tasks being executed until they finish their execution.
See Also:
GridFactory.RESTART_EXIT_CODE

kill

public static void kill(boolean cancel,
                        boolean wait)
Stops all started grids. If cancel flag is set to true then all jobs currently executing on the local node will be interrupted. If wait parameter is set to true then grid will wait for all tasks to be finished.

Note: it is usually safer and more appropriate to stop grid instances individually instead of blanket operation. In most cases, the party that started the grid instance should be responsible for stopping it.

Note that upon completion of this method, the JVM with forcefully exist with exit code GridFactory.KILL_EXIT_CODE.

Parameters:
cancel - If true then all jobs currently executing on all grids will be cancelled by calling GridJob.cancel() method. Note that just like with Thread.interrupt(), it is up to the actual job to exit from execution.
wait - If true then method will wait for all tasks being executed until they finish their execution.
See Also:
GridFactory.KILL_EXIT_CODE

start

public static Grid start()
                  throws GridException
Starts grid with default configuration. By default this method will use grid configuration defined in GRIDGAIN_HOME/config/default-spring.xml configuration file. If such file is not found, then all system defaults will be used.

Throws:
GridException - If default grid could not be started. This exception will be thrown also if default grid has already been started.
Returns:
Started grid.

start

public static Grid start(@Nullable
                         org.springframework.context.ApplicationContext springCtx)
                  throws GridException
Starts grid with default configuration. By default this method will use grid configuration defined in GRIDGAIN_HOME/config/default-spring.xml configuration file. If such file is not found, then all system defaults will be used.

Throws:
GridException - If default grid could not be started. This exception will be thrown also if default grid has already been started.
Parameters:
springCtx - Optional Spring application context.
Returns:
Started grid.

start

public static Grid start(GridConfiguration cfg)
                  throws GridException
Starts grid with given configuration. Note that this method is no-op if grid with the name provided in given configuration is already started.

Throws:
GridException - If grid could not be started. This exception will be thrown also if named grid has already been started.
Parameters:
cfg - Grid configuration. This cannot be null.
Returns:
Started grid.

start

public static Grid start(GridConfiguration cfg,
                         @Nullable
                         org.springframework.context.ApplicationContext springCtx)
                  throws GridException
Starts grid with given configuration. Note that this method is no-op if grid with the name provided in given configuration is already started.

Throws:
GridException - If grid could not be started. This exception will be thrown also if named grid has already been started.
Parameters:
cfg - Grid configuration. This cannot be null.
springCtx - Optional Spring application context, possibly null. If provided, this context can be injected into grid tasks and grid jobs using @GridSpringApplicationContextResource annotation.
Returns:
Started grid.

start

public static Grid start(@Nullable
                         String springCfgPath)
                  throws GridException
Starts all grids specified within given Spring XML configuration file. If grid with given name is already started, then exception is thrown. In this case all instances that may have been started so far will be stopped too.

Usually Spring XML configuration file will contain only one Grid definition. Note that Grid configuration bean(s) is retrieved form configuration file by type, so the name of the Grid configuration bean is ignored.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid.
Parameters:
springCfgPath - Spring XML configuration file path or URL.
Returns:
Started grid. If Spring configuration contains multiple grid instances, then the 1st found instance is returned.

in

public static void in(@Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts default grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true. If default grid has already been started prior to this method invocation then closures are executed with existing grid and not starting a new one. Accordingly this method does not stop the default grid if it didn't start it.

Note also that this method assumes there are no concurrent modifications of default grid state (either via stop() or start() methods).

Throws:
GridException - If grid could not be started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped (if it was started by this method).

Parameters:
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(@Nullable
                      String springCfgPath,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
springCfgPath - Spring XML configuration file path or URL.
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(@Nullable
                      String springCfgPath,
                      @Nullable
                      org.springframework.context.ApplicationContext ctx,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
springCfgPath - Spring XML configuration file path or URL.
ctx - Optional spring application context.
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(@Nullable
                      org.springframework.context.ApplicationContext ctx,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
ctx - Optional spring application context.
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(GridConfiguration cfg,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
cfg - Grid configuration. This cannot be null.
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(GridConfiguration cfg,
                      @Nullable
                      org.springframework.context.ApplicationContext ctx,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
cfg - Grid configuration. This cannot be null.
ctx - Optional spring application context.
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(@Nullable
                      URL springCfgUrl,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
springCfgUrl - Grid configuration.
ps - Set of closures to execute. If none provided - this method is no-op.

in

public static void in(@Nullable
                      URL springCfgUrl,
                      @Nullable
                      org.springframework.context.ApplicationContext ctx,
                      @Nullable
                      GridInClosure<Grid>... ps)
               throws GridException
Automatically starts specified grid, executes provided closures and stop the grid. Note that grid instance will be stopped with the cancel flag set to true.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid. It is also thrown if closure produces an exception.

Note that if a closure produces an exception no further closures will be executed and grid instance will be stopped.

Parameters:
springCfgUrl - Grid configuration.
ctx - Optional spring application context.
ps - Set of closures to execute. If none provided - this method is no-op.

start

public static Grid start(String springCfgPath,
                         @Nullable
                         org.springframework.context.ApplicationContext ctx)
                  throws GridException
Starts all grids specified within given Spring XML configuration file. If grid with given name is already started, then exception is thrown. In this case all instances that may have been started so far will be stopped too.

Usually Spring XML configuration file will contain only one Grid definition. Note that Grid configuration bean(s) is retrieved form configuration file by type, so the name of the Grid configuration bean is ignored.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid.
Parameters:
springCfgPath - Spring XML configuration file path or URL. This cannot be null.
ctx - Spring application context.
Returns:
Started grid. If Spring configuration contains multiple grid instances, then the 1st found instance is returned.

start

public static Grid start(URL springCfgUrl)
                  throws GridException
Starts all grids specified within given Spring XML configuration file URL. If grid with given name is already started, then exception is thrown. In this case all instances that may have been started so far will be stopped too.

Usually Spring XML configuration file will contain only one Grid definition. Note that Grid configuration bean(s) is retrieved form configuration file by type, so the name of the Grid configuration bean is ignored.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid.
Parameters:
springCfgUrl - Spring XML configuration file URL. This cannot be null.
Returns:
Started grid. If Spring configuration contains multiple grid instances, then the 1st found instance is returned.

start

public static Grid start(URL springCfgUrl,
                         @Nullable
                         org.springframework.context.ApplicationContext ctx)
                  throws GridException
Starts all grids specified within given Spring XML configuration file URL. If grid with given name is already started, then exception is thrown. In this case all instances that may have been started so far will be stopped too.

Usually Spring XML configuration file will contain only one Grid definition. Note that Grid configuration bean(s) is retrieved form configuration file by type, so the name of the Grid configuration bean is ignored.

Throws:
GridException - If grid could not be started or configuration read. This exception will be thrown also if grid with given name has already been started or Spring XML configuration file is invalid.
Parameters:
springCfgUrl - Spring XML configuration file URL. This cannot be null.
ctx - Optional Spring application context.
Returns:
Started grid. If Spring configuration contains multiple grid instances, then the 1st found instance is returned.

grid

public static Grid grid()
                 throws IllegalStateException
Gets an instance of default no-name grid. Note that caller of this method should not assume that it will return the same instance every time.

This method is identical to G.grid(null) apply.

Throws:
IllegalStateException - Thrown if default grid was not properly initialized or grid instance was stopped or was not started.
Returns:
An instance of default no-name grid. This method never returns null.

allGrids

public static List<Grid> allGrids()
Gets a list of all grids started so far.

Returns:
List of all grids started so far.

grid

public static Grid grid(UUID localNodeId)
                 throws IllegalStateException
Gets a grid instance for given local node ID. Note that grid instance and local node have one-to-one relationship where node has ID and instance has name of the grid to which both grid instance and its node belong. Note also that caller of this method should not assume that it will return the same instance every time.

Throws:
IllegalStateException - Thrown if grid was not properly initialized or grid instance was stopped or was not started.
Parameters:
localNodeId - ID of local node the requested grid instance is managing.
Returns:
An instance of named grid. This method never returns null.

grid

public static Grid grid(@Nullable
                        String name)
                 throws IllegalStateException
Gets an named grid instance. If grid name is null or empty string, then default no-name grid will be returned. Note that caller of this method should not assume that it will return the same instance every time.

Note that Java VM can run multiple grid instances and every grid instance (and its node) can belong to a different grid. Grid name defines what grid a particular grid instance (and correspondingly its node) belongs to.

Throws:
IllegalStateException - Thrown if default grid was not properly initialized or grid instance was stopped or was not started.
Parameters:
name - Grid name to which requested grid instance belongs to. If null, then grid instance belonging to a default no-name grid will be returned.
Returns:
An instance of named grid. This method never returns null.

addListener

public static void addListener(GridFactoryListener lsnr)
Adds a lsnr for grid life cycle events.

Note that unlike other listeners in GridGain this listener will be notified from the same thread that triggers the state change. Because of that it is the responsibility of the user to make sure that listener logic is light-weight and properly handles (catches) any runtime exceptions, if any are expected.

Parameters:
lsnr - Listener for grid life cycle events. If this listener was already added this method is no-op.

removeListener

public static boolean removeListener(GridFactoryListener lsnr)
Removes lsnr added by GridFactory.addListener(GridFactoryListener) method.

Parameters:
lsnr - Listener to remove.
Returns:
true if lsnr was added before, false otherwise.

GridGain™ 3.6.0e
Enterprise Edition

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