org.apache.ignite.mxbean

## Interface IgnitionMXBean

All Known Implementing Classes:
  IgnitionMXBeanAdapter

    @MXBeanDescription(value="MBean that provides access to grid life-cycle operations.")
    public interface IgnitionMXBean

This interface defines JMX view on `Ignition`.

### Method Summary

Methods
`String` `getState()` Gets state of default grid instance.
`String` `getState(String name)` Gets state for a given grid instance.
`void` `restart(boolean cancel)` Restart JVM.
`boolean` `stop(boolean cancel)` Stops default grid instance.
`boolean` `stop(String name, boolean cancel)` Stops named grid.
`void` `stopAll(boolean cancel)` Stops all started grids.

### Method Detail

#### getState

    @MXBeanDescription(value="State of default grid instance.")
    String getState()

Gets state of default grid instance.

Returns:
  State of default grid instance.
See Also:
  `Ignition.state()`

#### getState

    @MXBeanDescription(value="Gets state for a given grid instance. Returns state of grid instance with given name.")
    @MXBeanParametersNames(value="name")
    @MXBeanParametersDescriptions(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:
  `Ignition.state(String)`

#### stop

    @MXBeanDescription(value="Stops default grid instance. Return true if default grid instance was indeed stopped, false otherwise (if it was not started).")
    @MXBeanParametersNames(value="cancel")
    @MXBeanParametersDescriptions(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 `ComputeJob.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:
  `Ignition.stop(boolean)`

#### stop

    @MXBeanDescription(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.")
    @MXBeanParametersNames(value={"name","cancel"})
    @MXBeanParametersDescriptions(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 `ComputeJob.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:
  `Ignition.stop(String, boolean)`

#### stopAll

    @MXBeanDescription(value="Stops all started grids.")
    @MXBeanParametersNames(value="cancel")
    @MXBeanParametersDescriptions(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 `ComputeJob.cancel()` method. Note that just like with `Thread.interrupt()`, it is up to the actual job to exit from execution
See Also:
  `Ignition.stopAll(boolean)`

#### restart

    @MXBeanDescription(value="Restart JVM.")
    @MXBeanParametersNames(value={"cancel","wait"})
    @MXBeanParametersDescriptions(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 restart(boolean cancel)

Restart JVM.

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

2015 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 1.0.0
Release Date | : March 31 2015