Package io.camunda.zeebe.snapshots
Interface SnapshotChunkReader
- All Superinterfaces:
AutoCloseable,CloseableSilently,Iterator<SnapshotChunk>
- All Known Implementing Classes:
FileBasedSnapshotChunkReader
Represents a snapshot chunk reader, which means it is used to chunk an
PersistedSnapshot
and read it from it's persisted storage.-
Method Summary
Modifier and TypeMethodDescriptionnextId()Returns the next chunk ID; ifIterator.hasNext()should return false, then this will return null.voidreset()voidseek(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).Methods inherited from interface io.camunda.zeebe.util.CloseableSilently
closeMethods inherited from interface java.util.Iterator
forEachRemaining, hasNext, next, remove
-
Method Details
-
reset
void reset() -
seek
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; ifIterator.hasNext()should return false, then this will return null.- Returns:
- the next chunk ID
-