Class GridCheckpointManager
- java.lang.Object
-
- org.apache.ignite.internal.managers.GridManagerAdapter<CheckpointSpi>
-
- org.apache.ignite.internal.managers.checkpoint.GridCheckpointManager
-
- All Implemented Interfaces:
GridComponent,GridManager
public class GridCheckpointManager extends GridManagerAdapter<CheckpointSpi>
This class defines a checkpoint manager.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.ignite.internal.GridComponent
GridComponent.DiscoveryDataExchangeType
-
-
Field Summary
Fields Modifier and Type Field Description static intMAX_CLOSED_SESSMax closed topics to store.-
Fields inherited from class org.apache.ignite.internal.managers.GridManagerAdapter
ctx, log
-
-
Constructor Summary
Constructors Constructor Description GridCheckpointManager(GridKernalContext ctx)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable SerializableloadCheckpoint(GridTaskSessionInternal ses, String key)voidonSessionEnd(GridTaskSessionInternal ses, boolean cleanup)voidprintMemoryStats()Prints memory statistics (sizes of internal structures, etc.).booleanremoveCheckpoint(String key)booleanremoveCheckpoint(GridTaskSessionInternal ses, String key)Collection<IgniteUuid>sessionIds()voidstart()Starts grid component.voidstop(boolean cancel)Stops grid component.booleanstoreCheckpoint(GridTaskSessionInternal ses, String key, Object state, ComputeTaskSessionScope scope, long timeout, boolean override)-
Methods inherited from class org.apache.ignite.internal.managers.GridManagerAdapter
assertParameter, collectGridNodeData, collectJoiningNodeData, discoveryDataType, enabled, getSpi, getSpi, getSpis, inject, onAfterSpiStart, onBeforeSpiStart, onDisconnected, onGridDataReceived, onJoiningNodeDataReceived, onKernalStart, onKernalStart0, onKernalStop, onKernalStop0, onReconnected, startInfo, startSpi, stopInfo, stopSpi, toString, validateNode, validateNode
-
-
-
-
Field Detail
-
MAX_CLOSED_SESS
public static final int MAX_CLOSED_SESS
Max closed topics to store.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
GridCheckpointManager
public GridCheckpointManager(GridKernalContext ctx)
- Parameters:
ctx- Grid kernal context.
-
-
Method Detail
-
start
public void start() throws IgniteCheckedExceptionStarts grid component.- Throws:
IgniteCheckedException- Throws in case of any errors.
-
stop
public void stop(boolean cancel) throws IgniteCheckedExceptionStops grid component.- Parameters:
cancel- Iftrue, then all ongoing tasks or jobs for relevant components need to be cancelled.- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
sessionIds
public Collection<IgniteUuid> sessionIds()
- Returns:
- Session IDs.
-
storeCheckpoint
public boolean storeCheckpoint(GridTaskSessionInternal ses, String key, Object state, ComputeTaskSessionScope scope, long timeout, boolean override) throws IgniteCheckedException
- Parameters:
ses- Task session.key- Checkpoint key.state- Checkpoint state to save.scope- Checkpoint scope.timeout- Checkpoint timeout.override- Whether or not override checkpoint if it already exists.- Returns:
trueif checkpoint has been actually saved,falseotherwise.- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
removeCheckpoint
public boolean removeCheckpoint(String key)
- Parameters:
key- Checkpoint key.- Returns:
- Whether or not checkpoint was removed.
-
removeCheckpoint
public boolean removeCheckpoint(GridTaskSessionInternal ses, String key)
- Parameters:
ses- Task session.key- Checkpoint key.- Returns:
- Whether or not checkpoint was removed.
-
loadCheckpoint
@Nullable public @Nullable Serializable loadCheckpoint(GridTaskSessionInternal ses, String key) throws IgniteCheckedException
- Parameters:
ses- Task session.key- Checkpoint key.- Returns:
- Loaded checkpoint.
- Throws:
IgniteCheckedException- Thrown in case of any errors.
-
onSessionEnd
public void onSessionEnd(GridTaskSessionInternal ses, boolean cleanup)
- Parameters:
ses- Task session.cleanup- Whether cleanup or not.
-
printMemoryStats
public void printMemoryStats()
Prints memory statistics (sizes of internal structures, etc.). NOTE: this method is for testing and profiling purposes only.- Specified by:
printMemoryStatsin interfaceGridComponent- Overrides:
printMemoryStatsin classGridManagerAdapter<CheckpointSpi>
-
-