Interface PersistedSnapshot

All Superinterfaces:
AutoCloseable, CloseableSilently
All Known Implementing Classes:
FileBasedSnapshot

public interface PersistedSnapshot extends CloseableSilently
Represents a snapshot, which was persisted at the PersistedSnapshotStore.
  • 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