public class CommittedEventPoller extends Object implements MessageLog.Poller
| Constructor and Description |
|---|
CommittedEventPoller(MessageLog eventLog) |
CommittedEventPoller(MessageLog eventLog,
String id) |
| Modifier and Type | Method and Description |
|---|---|
long |
entryId()
Returns the current entry ID of this poller.
|
boolean |
moveTo(long entryId) |
MessageLog.Poller |
moveToEnd() |
boolean |
moveToNext() |
boolean |
moveToPrevious() |
MessageLog.Poller |
moveToStart() |
int |
poll(MessageLog.Handler handler) |
public CommittedEventPoller(MessageLog eventLog)
public CommittedEventPoller(MessageLog eventLog, String id)
public long entryId()
MessageLog.PollerIt returns the entry ID of the message currently polled if invoked while polling a message. Otherwise it returns the entry ID of the next message to be polled.
The index is monotonically increasing but not necessarily gap free; for instance for a chronicle message log the entry ID consists of cycle and the sequence number within that cycle.
entryId in interface MessageLog.Pollerpublic MessageLog.Poller moveToStart()
moveToStart in interface MessageLog.Pollerpublic MessageLog.Poller moveToEnd()
moveToEnd in interface MessageLog.Pollerpublic boolean moveToNext()
moveToNext in interface MessageLog.Pollerpublic boolean moveToPrevious()
moveToPrevious in interface MessageLog.Pollerpublic boolean moveTo(long entryId)
moveTo in interface MessageLog.Pollerpublic int poll(MessageLog.Handler handler)
poll in interface MessageLog.PollerCopyright © 2020 tools4j.org (Marco Terzer, Anton Anufriev). All Rights Reserved.