Package io.atomix.storage.journal
Interface JournalReader<E>
- All Superinterfaces:
AutoCloseable
Log reader.
- Author:
- Jordan Halterman
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA journal entry processor.static enumRaft log reader mode. -
Method Summary
-
Method Details
-
getNextIndex
long getNextIndex()Returns the next reader index.- Returns:
- The next reader index.
-
tryNext
Try to move to the next entry.- Parameters:
entryMapper- callback to be invoked for the entry- Returns:
- processed entry, or
null
-
reset
void reset()Resets the reader to the start. -
reset
void reset(long index) Resets the reader to the given index.- Parameters:
index- the next index to read
-
close
void close()- Specified by:
closein interfaceAutoCloseable
-