Interface StreamWindowListener<T>
-
- Type Parameters:
T
- Type of the tuple being handled.
- All Superinterfaces:
- java.util.EventListener
- All Known Subinterfaces:
- CheckpointableWindowListener<O,T>
- All Known Implementing Classes:
- SortedTupleWindow, StatefulWindowListener, TumblingWindowSort
public interface StreamWindowListener<T> extends java.util.EventListener
Handle StreamWindowEvents being generated by a StreamWindow.If an implementation of this class also implements
StateHandler
then when it isregistered as a window listener
it is alsoregistered as an operator's state handler
StatefulWindowListener
provides a abstract implementation of this interface that correctly maintains window state including support for partitioned windows and per-partition state, and persistence of that state. Operators may extendStatefulWindowListener
to implement their specific event handling without having to worry about per-partition state managment.Correct ordering of calls to
handleEvent()
is guaranteed byStreamWindow
. Calls tohandleEvent()
are synchronous but may be invoked by different threads. Each previoushandleEvent()
happens-before anyhandleEvent()
call to guarantee changes made in any previoushandleEvent()
are visible to the current call.
-
-
Method Summary
Methods Modifier and Type Method and Description void
handleEvent(StreamWindowEvent<T> event)
Handle a event from a StreamWindow.
-
-
-
Method Detail
-
handleEvent
void handleEvent(StreamWindowEvent<T> event) throws java.lang.Exception
Handle a event from a StreamWindow.- Parameters:
event
- Windowing event.- Throws:
java.lang.Exception
- Exception processing an event.
-
-