public class
InMemoryCheckpointHandler
extends Object
implements CheckpointHandler
implements CheckpointHandler
CheckpointHandler implementation to maintain in-memory checkpoint values.
Public Constructor Summary
InMemoryCheckpointHandler()
Creates an instance of
InMemoryCheckpointHandler |
Public Method Summary
synchronized byte[] |
readCheckpoint(String checkpointName)
Reads checkpoint value for given checkpoint name.
|
synchronized void |
saveCheckpoint(String checkpointName, byte[] checkpoint)
Saves given checkpoint value.
|
Inherited Method Summary
Public Constructors
Public Methods
public synchronized byte[] readCheckpoint (String checkpointName)
Reads checkpoint value for given checkpoint name.
Parameters
checkpointName | the name of the checkpoint to read |
---|
Returns
- current value of checkpoint.
null
if checkpoint is empty or not available
Throws
IOException |
---|
public synchronized void saveCheckpoint (String checkpointName, byte[] checkpoint)
Saves given checkpoint value.
Parameters
checkpointName | the name of the checkpoint to save |
---|---|
checkpoint | value to save |
Throws
IOException |
---|