Click on Javadoc link to open Javadoc documentation.
Package
org.gridgain.grid.spi.checkpoint Javadoc![]()
Built-in Implementations
GridGain comes with three checkpoint SPIs supported out of the box:
- GridSharedFsCheckpointSPI - SPI implementation based on shared file system.
- GridCoherenceCheckpointSPI - SPI implementation based on Coherence distributed caching technology.
- GridGigaspacesCheckpointSPI - SPI implementation based on GigaSpaces Java Spaces-based caching technology.
Description
GridCheckpointSpi Javadoc
provides an ability to save an intermediate job state. It can be useful when long running jobs need to store some intermediate state to protect from node failures. Then on restart of a failed node, a job would load the saved check point and continue from where it left off. Checkpoint SPI can also be used for exchanging data between jobs on different nodes, e. g. a job on one node can save some state and another job on a different node can load this state to use it in its own execution. The only requirement for job state is to implement java.io.Serializable interface.
| Checkpoint Access Checkpoints must be equally accessible from all grid nodes. So if a job saves a check point on one node, another job on a different node should be able to retrieve it. This is required because grid topology is dynamic and the same task can be executed on different nodes every time. Hence for a task job to pick up from where the previous job left off, it must have access to the checkpoint saved by another job potentially on another node. |
Checkpoints are available through GridTaskSession ![]()
- GridTaskSession.loadCheckPoint(...)
Javadoc 
- GridTaskSession.removeCheckPoint(...)
Javadoc 
- GridTaskSession.saveCheckPoint(...)
Javadoc 
Configuration
GridCheckpointSpi ![]()
![]()
GridConfigurationAdapter cfg = new GridConfigurationAdapter(); // Configure Shared Filesystem Checkpoint SPI to load/save // checkpoints from a shared file system. cfg.setCheckpointSpi(new GridSharedFsCheckpointSpi()); GridFactory.start(cfg);
Note that GridConfiguration ![]()

For more information about using Spring framework for configuration click here.
Default Implementation
If no checkpoint SPI is provided in configuration by default GridSharedFsCheckpointSpi is used.

