GridGain™ 2.1.0
Java API Specification

org.gridgain.grid
Interface GridFactoryMBean


@Apache20LicenseCompatible
@GridMBeanDescription(value="MBean that provides access to grid life-cycle operations.")
public interface GridFactoryMBean

This interface defines JMX view on GridFactory.



See Also:

  Documentation
  Email Support
  Online Forums
  Issue Tracking

Author:   2005-2008 Copyright © GridGain Systems. All Rights Reserved. ver. 2.1.0

 

Method Summary
 String getState()
          Gets state of default grid instance.
 String getState(String name)
          Gets state for a given grid instance.
 boolean stop(boolean cancel)
          Stops default grid instance.
 boolean stop(boolean cancel, boolean wait)
          Stops default grid.
 boolean stop(String name, boolean cancel)
          Stops named grid.
 boolean stop(String name, boolean cancel, boolean wait)
          Stops named grid.
 void stopAll(boolean cancel)
          Stops all started grids.
 void stopAll(boolean cancel, boolean wait)
          Stops all started grids.
 

Method Detail

getState

@GridMBeanDescription(value="State of default grid instance.")
String getState()
Gets state of default grid instance.

Returns:
State of default grid instance.
See Also:
GridFactory.getState()

getState

@GridMBeanDescription(value="Gets state for a given grid instance. Returns state of grid instance with given name.")
@GridMBeanParametersNames(value="name")
@GridMBeanParametersDescriptions(value="Name of grid instance.")
String getState(String name)
Gets state for a given grid instance.

Parameters:
name - Name of grid instance.
Returns:
State of grid instance with given name.
See Also:
GridFactory.getState(String)

stop

@GridMBeanDescription(value="Stops default grid instance. Return true if default grid instance was indeed stopped, false otherwise (if it was not started).")
@GridMBeanParametersNames(value="cancel")
@GridMBeanParametersDescriptions(value="If true then all jobs currently executing on default grid will be cancelled.")
boolean stop(boolean cancel)
Stops default grid instance.

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).
See Also:
GridFactory.stop(boolean)

stop

@GridMBeanDescription(value="Stops grid by name. Cancels running jobs if cancel is true. Returns true if named grid instance was indeed found and stopped, false otherwise.")
@GridMBeanParametersNames(value={"name","cancel"})
@GridMBeanParametersDescriptions(value={"Grid instance name to stop.","Whether or not running jobs should be cancelled."})
boolean stop(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).
See Also:
GridFactory.stop(String, boolean)

stopAll

@GridMBeanDescription(value="Stops all started grids.")
@GridMBeanParametersNames(value="cancel")
@GridMBeanParametersDescriptions(value="If true then all jobs currently executing on all grids will be cancelled.")
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
See Also:
GridFactory.stopAll(boolean)

stop

@GridMBeanDescription(value="Stops default grid. Return true if default grid instance was indeed stopped, false otherwise (if it was not started).")
@GridMBeanParametersNames(value={"cancel","wait"})
@GridMBeanParametersDescriptions(value={"If true then all jobs currently executing on default grid will be cancelled.","If true then method will wait for all task being executed until they finish their execution."})
boolean stop(boolean cancel,
                                                                                           boolean wait)
Stops default grid. This method is identical to GridFactory.stop(null, cancel, wait) call. 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 task being executed until they finish their execution.
Returns:
true if default grid instance was indeed stopped, false otherwise (if it was not started).
See Also:
GridFactory.stop(boolean, boolean)

stop

@GridMBeanDescription(value="Stops named grid.Return true  if named grid instance was indeed stopped, false otherwise (if it was not started).")
@GridMBeanParametersNames(value={"name","cancel","wait"})
@GridMBeanParametersDescriptions(value={"Grid name. If null, then default no-name grid will be stopped.","If true then all jobs currently executing on default grid will be cancelled.","If true then method will wait for all task being executed until they finish their execution."})
boolean stop(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 task 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).
See Also:
GridFactory.stop(String, boolean, boolean)

stopAll

@GridMBeanDescription(value="Stops all started grids.")
@GridMBeanParametersNames(value={"cancel","wait"})
@GridMBeanParametersDescriptions(value={"If true then all jobs currently executing on default grid will be cancelled.","If true then method will wait for all task being executed until they finish their execution."})
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 task being executed until they finish their execution.
See Also:
GridFactory.stopAll(boolean, boolean)

GridGain™ 2.1.0
Java API Specification

GridGain™ - Grid Computing Made Simple, ver. 2.1.0.19122008
2005-2008 Copyright © GridGain Systems. All Rights Reserved.