public class StateSnapshotController extends Object implements SnapshotController
| Constructor and Description |
|---|
StateSnapshotController(StateController controller,
StateStorage storage) |
| Modifier and Type | Method and Description |
|---|---|
void |
purgeAll(java.util.function.Predicate<StateSnapshotMetadata> matcher)
Purges all snapshots which return true for the given matcher.
|
StateSnapshotMetadata |
recover(long commitPosition,
int term,
java.util.function.Predicate<StateSnapshotMetadata> filter)
Recovers the state from the latest snapshot and returns the corresponding metadata.
|
void |
takeSnapshot(StateSnapshotMetadata metadata)
Takes a snapshot based on the given metadata: - last successful processed event - last written
event (regardless of whether or not it is committed) - term of the last written event
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpurgeAll, purgeAllExcept, takeSnapshotpublic StateSnapshotController(StateController controller, StateStorage storage)
public void takeSnapshot(StateSnapshotMetadata metadata) throws Exception
SnapshotControllertakeSnapshot in interface SnapshotControllermetadata - current state metadataExceptionpublic StateSnapshotMetadata recover(long commitPosition, int term, java.util.function.Predicate<StateSnapshotMetadata> filter) throws Exception
SnapshotControllerrecover in interface SnapshotControllercommitPosition - current log stream commit positionExceptionpublic void purgeAll(java.util.function.Predicate<StateSnapshotMetadata> matcher) throws Exception
SnapshotControllerpurgeAll in interface SnapshotControllermatcher - predicate used to matchExceptionCopyright © 2017–2018 camunda services GmbH. All rights reserved.