public interface CompletedCheckpointStore
CompletedCheckpoint instances.| Modifier and Type | Method and Description |
|---|---|
void |
addCheckpoint(CompletedCheckpoint checkpoint)
Adds a
CompletedCheckpoint instance to the list of completed checkpoints. |
List<CompletedCheckpoint> |
getAllCheckpoints()
Returns all
CompletedCheckpoint instances. |
CompletedCheckpoint |
getLatestCheckpoint()
Returns the latest
CompletedCheckpoint instance or null if none was
added. |
int |
getNumberOfRetainedCheckpoints()
Returns the current number of retained checkpoints.
|
void |
recover()
Recover available
CompletedCheckpoint instances. |
void |
shutdown()
Shuts down the store and discards all checkpoint instances.
|
void |
suspend()
Suspends the store.
|
void recover()
throws Exception
CompletedCheckpoint instances.
After a call to this method, getLatestCheckpoint() returns the latest
available checkpoint.
Exceptionvoid addCheckpoint(CompletedCheckpoint checkpoint) throws Exception
CompletedCheckpoint instance to the list of completed checkpoints.
Only a bounded number of checkpoints is kept. When exceeding the maximum number of
retained checkpoints, the oldest one will be discarded via CompletedCheckpoint.discard(ClassLoader).
ExceptionCompletedCheckpoint getLatestCheckpoint() throws Exception
CompletedCheckpoint instance or null if none was
added.Exceptionvoid shutdown()
throws Exception
Exceptionvoid suspend()
throws Exception
If the implementation allows recovery, checkpoint state needs to be kept around. Otherwise, this should act like shutdown.
ExceptionList<CompletedCheckpoint> getAllCheckpoints() throws Exception
CompletedCheckpoint instances.
Returns an empty list if no checkpoint has been added yet.
Exceptionint getNumberOfRetainedCheckpoints()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.