Package org.apache.ignite.internal
Class IgnitionMXBeanAdapter
- java.lang.Object
-
- org.apache.ignite.internal.IgnitionMXBeanAdapter
-
- All Implemented Interfaces:
IgnitionMXBean
public class IgnitionMXBeanAdapter extends Object implements IgnitionMXBean
Management bean that provides access toIgnition.
-
-
Constructor Summary
Constructors Constructor Description IgnitionMXBeanAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetState()Gets state of default grid instance.StringgetState(String name)Gets state for a given grid instance.voidrestart(boolean cancel)Restart JVM.booleanstop(boolean cancel)Stops default grid instance.booleanstop(String name, boolean cancel)Stops named Ignite instance.voidstopAll(boolean cancel)Stops all started grids.
-
-
-
Method Detail
-
getState
public String getState()
Gets state of default grid instance.- Specified by:
getStatein interfaceIgnitionMXBean- Returns:
- State of default grid instance.
- See Also:
Ignition.state()
-
getState
public String getState(String name)
Gets state for a given grid instance.- Specified by:
getStatein interfaceIgnitionMXBean- Parameters:
name- Name of grid instance.- Returns:
- State of grid instance with given name.
- See Also:
Ignition.state(String)
-
stop
public boolean stop(boolean cancel)
Stops default grid instance.- Specified by:
stopin interfaceIgnitionMXBean- Parameters:
cancel- Iftruethen all jobs currently executing on default grid will be cancelled by callingComputeJob.cancel()method. Note that just like withThread.interrupt(), it is up to the actual job to exit from execution.- Returns:
trueif default grid instance was indeed stopped,falseotherwise (if it was not started).- See Also:
Ignition.stop(boolean)
-
stop
public boolean stop(String name, boolean cancel)
Stops named Ignite instance. Ifcancelflag is set totruethen all jobs currently executing on local node will be interrupted. If Ignite instance name isnull, then default no-name Ignite instance will be stopped. It does not wait for the tasks to finish their execution.- Specified by:
stopin interfaceIgnitionMXBean- Parameters:
name- Ignite instance name. Ifnull, then default no-name Ignite instance will be stopped.cancel- Iftruethen all jobs currently will be cancelled by callingComputeJob.cancel()method. Note that just like withThread.interrupt(), it is up to the actual job to exit from execution. Iffalse, 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:
trueif named Ignite instance instance was indeed found and stopped,falseotherwise (the instance with givennamewas not found).- See Also:
Ignition.stop(String, boolean)
-
stopAll
public void stopAll(boolean cancel)
Stops all started grids. Ifcancelflag is set totruethen 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.
- Specified by:
stopAllin interfaceIgnitionMXBean- Parameters:
cancel- Iftruethen all jobs currently executing on all grids will be cancelled by callingComputeJob.cancel()method. Note that just like withThread.interrupt(), it is up to the actual job to exit from execution- See Also:
Ignition.stopAll(boolean)
-
restart
public void restart(boolean cancel)
Restart JVM.- Specified by:
restartin interfaceIgnitionMXBean- Parameters:
cancel- Iftruethen all jobs currently executing on all grids will be cancelled by callingComputeJob.cancel()method. Note that just like withThread.interrupt(), it is up to the actual job to exit from execution- See Also:
Ignition.stopAll(boolean)
-
-