T
- The type of the event.public interface EventRead<T>
A checkpoint is an indication that the reading application should persist its state to durable storage before reading further. A checkpoint also represents a point where events waiting to be read may be rebalanced among the readers in a group. So before a checkpoint one reader might be handling all of the events sent with routing key X but afterwards it may be a different reader.
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getCheckpointName()
If a checkpoint has been requested this will return the checkpointName passed to
ReaderGroup.initiateCheckpoint(String,ScheduledExecutorService) otherwise this will return null. |
T |
getEvent()
Returns the event that is wrapped in this EventRead or null a timeout occurred or if a checkpoint was requested.
|
EventPointer |
getEventPointer()
Returns a pointer object for the event read.
|
Position |
getPosition()
The position in the stream that represents where the reader is immediately following this
event.
|
boolean |
isCheckpoint()
A boolean indicating if this is a checkpoint.
|
T getEvent()
Position getPosition()
ReaderGroup.readerOffline(String, Position)
can be called if the reader dies.EventPointer getEventPointer()
boolean isCheckpoint()
getCheckpointName()
will be non-null
and getEvent()
will be null.java.lang.String getCheckpointName()
ReaderGroup.initiateCheckpoint(String,ScheduledExecutorService)
otherwise this will return null.