EventT
- StateT
- public interface EventExaminer<EventT,StateT extends MutableState<EventT,?>>
extends java.io.Serializable
OrderedEventProcessor
to examine every
incoming event.Modifier and Type | Method and Description |
---|---|
StateT |
createStateOnInitialEvent(EventT event)
If the event was the first event in the sequence, create the state to hold the required data
needed for processing.
|
boolean |
isInitialEvent(long sequenceNumber,
EventT event)
Is this event the first expected event for the given key and window?
|
boolean |
isLastEvent(long sequenceNumber,
EventT event)
Is this event the last expected event for a given key and window?
|
boolean isInitialEvent(long sequenceNumber, EventT event)
sequenceNumber
- the sequence number of the event as defined by the key of the input
PCollection to OrderedEventProcessor
event
- being processedStateT createStateOnInitialEvent(EventT event)
event
- the first event in the sequence.boolean isLastEvent(long sequenceNumber, EventT event)
sequenceNumber
- of the eventevent
- being processed