public class StatefulWindowManager<T> extends WindowManager<T>
evictionPolicy, EXPIRE_EVENTS_THRESHOLD, queue, triggerPolicy, windowLifecycleListener
Constructor and Description |
---|
StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener) |
StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener,
java.util.Collection<Event<T>> queue)
Constructs a
StatefulWindowManager |
Modifier and Type | Method and Description |
---|---|
protected void |
compactWindow()
expires events that fall out of the window every EXPIRE_EVENTS_THRESHOLD so that the window does not grow too big.
|
boolean |
onTrigger()
The callback invoked by the trigger policy.
|
add, add, add, getEarliestEventTs, getEventCount, getSlidingCountTimestamps, getState, restoreState, setEvictionPolicy, setTriggerPolicy, shutdown, toString
public StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener)
public StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener, java.util.Collection<Event<T>> queue)
StatefulWindowManager
lifecycleListener
- the WindowLifecycleListener
queue
- a collection where the events in the window can be enqueued. protected void compactWindow()
WindowManager
compactWindow
in class WindowManager<T>
public boolean onTrigger()
WindowManager
onTrigger
in interface TriggerHandler
onTrigger
in class WindowManager<T>