org.apache.ignite.internal.managers.checkpoint

## 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
`static int` `MAX_CLOSED_SESS` Max closed topics to store.

### Fields inherited from class org.apache.ignite.internal.managers.GridManagerAdapter

`ctx, log`

### Constructor Summary

Constructors
Constructor and Description
`GridCheckpointManager(GridKernalContext ctx)`

### Method Summary

All Methods Instance Methods Concrete Methods
`Serializable` `loadCheckpoint(GridTaskSessionInternal ses, String key)`
`void` `onSessionEnd(GridTaskSessionInternal ses, boolean cleanup)`
`void` `printMemoryStats()` Prints memory statistics (sizes of internal structures, etc.).
`boolean` `removeCheckpoint(GridTaskSessionInternal ses, String key)`
`boolean` `removeCheckpoint(String key)`
`Collection<IgniteUuid>` `sessionIds()`
`void` `start()` Starts grid component.
`void` `stop(boolean cancel)` Stops grid component.
`boolean` `storeCheckpoint(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`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### 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 IgniteCheckedException

Starts grid component.

Throws:
  `IgniteCheckedException` - Throws in case of any errors.

#### stop

    public void stop(boolean cancel)
              throws IgniteCheckedException

Stops grid component.

Parameters:
  `cancel` - If `true`, 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:
  `true` if checkpoint has been actually saved, `false` otherwise.
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 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:
  `printMemoryStats` in interface `GridComponent`
Overrides:
  `printMemoryStats` in class `GridManagerAdapter<CheckpointSpi>`

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.6.0
Release Date | : July 10 2018