public class SavepointStore extends Object implements StateStore<CompletedCheckpoint>
Constructor and Description |
---|
SavepointStore(StateStore<CompletedCheckpoint> stateStore) |
Modifier and Type | Method and Description |
---|---|
void |
disposeState(String path)
Disposes the state identified by the given (logical) path.
|
CompletedCheckpoint |
getState(String path)
Returns the object identified by the given (logical) path.
|
String |
putState(CompletedCheckpoint state)
Puts an object into the store and returns the (logical) path to it.
|
void |
start() |
void |
stop() |
public SavepointStore(StateStore<CompletedCheckpoint> stateStore)
public void start()
public void stop()
public String putState(CompletedCheckpoint state) throws Exception
StateStore
The stored state can be retrieved or discarded by specifying the returned path.
putState
in interface StateStore<CompletedCheckpoint>
state
- The object to store.Exception
public CompletedCheckpoint getState(String path) throws Exception
StateStore
getState
in interface StateStore<CompletedCheckpoint>
path
- The path of the object to retrieve.IllegalArgumentException
- If the path does not identify a valid object.Exception
public void disposeState(String path) throws Exception
StateStore
disposeState
in interface StateStore<CompletedCheckpoint>
path
- The path of the object to discard.IllegalArgumentException
- If the path does not identify a valid object.Exception
Copyright © 2014–2017 The Apache Software Foundation. All rights reserved.