public interface IndexTrackingPoller extends MessageLog.Poller
| Modifier and Type | Method and Description |
|---|---|
static IndexTrackingPoller |
create(MessageLog messageLog) |
long |
index()
Returns the current index of this poller.
|
MessageLog.Poller |
moveToEnd()
NOTE: this method is possibly slow if it has to move a lot of positions!
Moves to the end of the message log.
|
boolean |
moveToIndex(long index)
NOTE: this method is possibly slow if it has to move a lot of positions!
Moves to the specified index
|
entryId, moveTo, moveToNext, moveToPrevious, moveToStart, polllong index()
It returns the index of the message currently polled if invoked while polling a message. Otherwise it returns the index of the next message to be polled.
The index monotonically increasing and gap free.
boolean moveToIndex(long index)
index - the index to move to, valid from zero to (#entries - 1)MessageLog.Poller moveToEnd()
moveToEnd in interface MessageLog.Pollerstatic IndexTrackingPoller create(MessageLog messageLog)
Copyright © 2020 tools4j.org (Marco Terzer, Anton Anufriev). All Rights Reserved.