Package io.camunda.zeebe.snapshots.impl
Class FileBasedTransientSnapshot
java.lang.Object
io.camunda.zeebe.snapshots.impl.FileBasedTransientSnapshot
- All Implemented Interfaces:
PersistableSnapshot,TransientSnapshot
Represents a pending snapshot, that is a snapshot in the process of being written and has not yet
been committed to the store.
-
Method Summary
Modifier and TypeMethodDescriptionabort()Aborts the not yet persisted snapshot and removes all related data.getPath()Returns the pending snapshot's path.persist()Persists the snapshot with all his data and returns the representation of this snapshot.Takes a snapshot on the given path.toString()
-
Method Details
-
take
Description copied from interface:TransientSnapshotTakes 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.- Specified by:
takein interfaceTransientSnapshot- Parameters:
takeSnapshot- the predicate which should take the snapshot and should return true on success- Returns:
- true on success, false otherwise
-
abort
Description copied from interface:PersistableSnapshotAborts the not yet persisted snapshot and removes all related data.- Specified by:
abortin interfacePersistableSnapshot- Returns:
- a future which will be completed when the abort is done.
-
persist
Description copied from interface:PersistableSnapshotPersists the snapshot with all his data and returns the representation of this snapshot.- Specified by:
persistin interfacePersistableSnapshot- Returns:
- a future that will be completed with the persisted snapshot
-
snapshotId
- Specified by:
snapshotIdin interfacePersistableSnapshot- Returns:
- the snapshotId of the snapshot
-
getPath
Description copied from interface:PersistableSnapshotReturns the pending snapshot's path.- Specified by:
getPathin interfacePersistableSnapshot- Returns:
- the path of the pending snapshot
-
toString
-