Package org.apache.storm.windowing
Interface WindowLifecycleListener<T>
- Type Parameters:
- T- The type of Event in the window (e.g. Tuple).
public interface WindowLifecycleListener<T>
A callback for expiry, activation of events tracked by the 
WindowManager.- 
Method SummaryModifier and TypeMethodDescriptiondefault voidonActivation(Supplier<Iterator<T>> eventsIt, Supplier<Iterator<T>> newEventsIt, Supplier<Iterator<T>> expiredIt, Long referenceTime) Called on activation of the window due to theTriggerPolicy.default voidCalled on activation of the window due to theTriggerPolicy.voidCalled on expiry of events from the window due toEvictionPolicy.
- 
Method Details- 
onExpiryCalled on expiry of events from the window due toEvictionPolicy.- Parameters:
- events- the expired events
 
- 
onActivationCalled on activation of the window due to theTriggerPolicy.- Parameters:
- events- the list of current events in the window.
- newEvents- the newly added events since last activation.
- expired- the expired events since last activation.
- referenceTime- the reference (event or processing) time that resulted in activation
 
- 
onActivationdefault void onActivation(Supplier<Iterator<T>> eventsIt, Supplier<Iterator<T>> newEventsIt, Supplier<Iterator<T>> expiredIt, Long referenceTime) Called on activation of the window due to theTriggerPolicy. This is typically invoked when the windows are persisted in state and is huge to be loaded entirely in memory.- Parameters:
- eventsIt- a supplier of iterator over the list of current events in the window
- newEventsIt- a supplier of iterator over the newly added events since the last ativation
- expiredIt- a supplier of iterator over the expired events since the last activation
- referenceTime- the reference (event or processing) time that resulted in activation
 
 
-