Package io.camunda.zeebe.snapshots
Interface TransientSnapshot
- All Superinterfaces:
PersistableSnapshot
- All Known Implementing Classes:
FileBasedTransientSnapshot
A transient snapshot which can be persisted after taking a snapshot.
-
Method Summary
Modifier and TypeMethodDescriptionTakes a snapshot on the given path.withLastFollowupEventPosition(long followupEventPosition) A snapshot is only valid if the accompanying logstream has events from processedPosition up to the last followup event position.Methods inherited from interface io.camunda.zeebe.snapshots.PersistableSnapshot
abort, getPath, persist, snapshotId
-
Method Details
-
take
Takes a snapshot on the given path. This can be persisted later via callingPersistableSnapshot.persist(). Based on the implementation this could mean that this is writen before on a temporary folder and then moved to the valid snapshot directory.- Parameters:
takeSnapshot- the predicate which should take the snapshot and should return true on success- Returns:
- true on success, false otherwise
-
withLastFollowupEventPosition
A snapshot is only valid if the accompanying logstream has events from processedPosition up to the last followup event position. The last followUp event position is the position of an event whose source position >= actual processed position in the state.- Parameters:
followupEventPosition- position of the followup event which must be in the logstream to ensure that the system can recover from the snapshot and the events in the logstream.- Returns:
- transient snapshot.
-