Interface SnapshotChunkReader

All Superinterfaces:
AutoCloseable, CloseableSilently, Iterator<SnapshotChunk>
All Known Implementing Classes:
FileBasedSnapshotChunkReader

public interface SnapshotChunkReader extends Iterator<SnapshotChunk>, CloseableSilently
Represents a snapshot chunk reader, which means it is used to chunk an PersistedSnapshot and read it from it's persisted storage.
  • Method Details

    • reset

      void reset()
    • seek

      void seek(ByteBuffer id)
      Skips all chunks up to the one with the given ID, inclusively, such that the next chunk would be the chunk right after it (if any). If no ID is given then should not do anything.
      Parameters:
      id - the chunk ID to seek to; maybe null
    • nextId

      ByteBuffer nextId()
      Returns the next chunk ID; if Iterator.hasNext() should return false, then this will return null.
      Returns:
      the next chunk ID