com.ibm.streams.operator.window

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 is registered as a window listener it is also registered 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 extend StatefulWindowListener to implement their specific event handling without having to worry about per-partition state managment.

    Correct ordering of calls tohandleEvent() is guaranteed by StreamWindow. Calls to handleEvent() are synchronous but may be invoked by different threads. Each previous handleEvent() happens-before any handleEvent() call to guarantee changes made in any previous handleEvent() are visible to the current call.

    • 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.