Interface Replicator.Reader
- All Superinterfaces:
AutoCloseable, Closeable, Replicator.Accessor
- All Known Subinterfaces:
MessageReplicator.Reader, StreamReplicator.Reader
- Enclosing interface:
Replicator
Direct interface for reading from a replicator, for a given term.
-
Method Summary
Methods inherited from interface Replicator.Accessor
addCommitListener, close, commitPosition, position, term, termEndPosition, termStartPosition, uponCommit, waitForCommit, waitForEndCommitModifier and TypeMethodDescriptionvoidaddCommitListener(LongConsumer listener) Install a callback which receives a stream of commit position updates.voidclose()longReturns the current term commit position, which might be lower than the start position.longposition()Returns the next log position which will be accessed.longterm()Returns the fixed term being accessed.longReturns the current term end position, which is Long.MAX_VALUE if unbounded.longReturns the position at the start of the term.voiduponCommit(long position, LongConsumer task) Invokes the given task when the commit position reaches the requested position.longwaitForCommit(long position, long nanosTimeout) Blocks until the commit position reaches the given position.default longwaitForEndCommit(long nanosTimeout) Blocks until the commit position reaches the end of the term.