Package io.camunda.zeebe.snapshots.impl
Class FileBasedReceivedSnapshot
java.lang.Object
io.camunda.zeebe.snapshots.impl.FileBasedReceivedSnapshot
- All Implemented Interfaces:
PersistableSnapshot,ReceivedSnapshot
-
Method Summary
Modifier and TypeMethodDescriptionabort()Aborts the not yet persisted snapshot and removes all related data.apply(SnapshotChunk snapshotChunk) Applies the nextSnapshotChunkto the snapshot.getPath()Returns the pending snapshot's path.longindex()The index of the current receiving snapshot.persist()Persists the snapshot with all his data and returns the representation of this snapshot.toString()
-
Method Details
-
index
public long index()Description copied from interface:ReceivedSnapshotThe index of the current receiving snapshot.- Specified by:
indexin interfaceReceivedSnapshot- Returns:
- the snapshot's index
-
apply
Description copied from interface:ReceivedSnapshotApplies the nextSnapshotChunkto the snapshot. Based on the implementation the chunk can be validated before applied to the snapshot. In case of failure, the future will be completed with a SnapshotWriteException.- Specified by:
applyin interfaceReceivedSnapshot- Parameters:
snapshotChunk- theSnapshotChunkwhich should be applied
-
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
-