-
- Type Parameters:
T- the type of the event
- Enclosing class:
- EventPoller<T>
public static interface EventPoller.Handler<T>A callback used to process events
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanonEvent(T event, long sequence, boolean endOfBatch)Called for each event to consume it
-
-
-
Method Detail
-
onEvent
boolean onEvent(T event, long sequence, boolean endOfBatch) throws java.lang.Exception
Called for each event to consume it- Parameters:
event- the eventsequence- the sequence of the eventendOfBatch- whether this event is the last in the batch- Returns:
- whether to continue consuming events. If
false, the poller will not feed any more events to the handler untilEventPoller.poll(Handler)is called again - Throws:
java.lang.Exception- any exceptions thrown by the handler will be propagated to the caller ofpoll
-
-