public class FsSnapshotController extends Object implements SnapshotController
| Constructor and Description |
|---|
FsSnapshotController(SnapshotStorage storage,
String name,
SnapshotSupport resource) |
| Modifier and Type | Method and Description |
|---|---|
void |
purgeAll(java.util.function.Predicate<StateSnapshotMetadata> filter)
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
|
void |
takeSnapshot(StateSnapshotMetadata metadata,
long commitPosition)
Temporary addition to add commitPosition to parameters, will be removed since it's only useful
for FsSnapshotController.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpurgeAll, purgeAllExceptpublic FsSnapshotController(SnapshotStorage storage, String name, SnapshotSupport resource)
public void takeSnapshot(StateSnapshotMetadata metadata, long commitPosition) throws Exception
SnapshotControllertakeSnapshot in interface SnapshotControllermetadata - current state metadatacommitPosition - temporary parameter, to be removed once Fs package is removedExceptionpublic 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> filter) throws Exception
SnapshotControllerpurgeAll in interface SnapshotControllerfilter - predicate used to matchExceptionCopyright © 2017–2018 camunda services GmbH. All rights reserved.