|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StateStorage
Defines the methods that must be implemented by a backend storage for checkpoints.
NOTE: the backend implementation usually needs some kind of initialization. The recommended place to do this is in a custom method annotated withInject
annotation, which will be called after the instance is constructed.
Method Summary | |
---|---|
byte[] |
fetchState(CheckpointId key)
Fetches data for a stored checkpoint. |
java.util.Set<CheckpointId> |
fetchStoredKeys()
Fetches all stored safeKeeper Ids. |
void |
saveState(CheckpointId key,
byte[] state,
StorageCallback callback)
Stores a checkpoint. |
Method Detail |
---|
void saveState(CheckpointId key, byte[] state, StorageCallback callback)
NOTE: we don't handle any failure/success return value, because all failure/success notifications go through the StorageCallback reference
key
- safeKeeperIdstate
- checkpoint data as a byte arraycallback
- callback for receiving notifications of storage operations. This callback is configurablebyte[] fetchState(CheckpointId key)
Must return null if storage does not contain this key.
key
- safeKeeperId for this checkpoint
java.util.Set<CheckpointId> fetchStoredKeys()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |