Package io.camunda.zeebe.snapshots
Interface PersistedSnapshot
- All Superinterfaces:
AutoCloseable,CloseableSilently
- All Known Implementing Classes:
FileBasedSnapshot
Represents a snapshot, which was persisted at the
PersistedSnapshotStore.-
Method Summary
Modifier and TypeMethodDescriptionvoiddelete()Deletes the snapshot.longReturns the checksum of the snapshot, which can be used to verify integrity.longReturns an implementation specific compaction bound, e.g.getId()longgetIndex()Returns the snapshot index.getPath()longgetTerm()Returns the snapshot term.Returns a new snapshot chunk reader for this snapshot.intversion()Returns the snapshot format version.Methods inherited from interface io.camunda.zeebe.util.CloseableSilently
close
-
Method Details
-
version
int version()Returns the snapshot format version.- Returns:
- the snapshot format version
-
getIndex
long getIndex()Returns the snapshot index.The snapshot index is the index of the state machine at the point at which the snapshot was persisted.
- Returns:
- The snapshot index.
-
getTerm
long getTerm()Returns the snapshot term.The snapshot term is the term of the state machine at the point at which the snapshot was persisted.
- Returns:
- The snapshot term.
-
newChunkReader
SnapshotChunkReader newChunkReader()Returns a new snapshot chunk reader for this snapshot. Chunk readers are meant to be one-time use and as such don't have to be thread-safe.- Returns:
- a new snapshot chunk reader
-
delete
void delete()Deletes the snapshot. -
getPath
Path getPath()- Returns:
- a path to the snapshot location
-
getCompactionBound
long getCompactionBound()Returns an implementation specific compaction bound, e.g. a log stream position, index etc., used during compaction- Returns:
- the compaction upper bound
-
getId
String getId()- Returns:
- the identifier of the snapshot
-
getChecksum
long getChecksum()Returns the checksum of the snapshot, which can be used to verify integrity.- Returns:
- the checksum of the snapshot
-