public class StatefulWindowManager<T> extends WindowManager<T>
Window manager that handles windows with state persistence.
evictionPolicy, EXPIRE_EVENTS_THRESHOLD, queue, triggerPolicy, windowLifecycleListener| Constructor and Description |
|---|
StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener) |
StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener,
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, toStringpublic StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener)
public StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener, Collection<Event<T>> queue)
Constructs a StatefulWindowManager.
lifecycleListener - the WindowLifecycleListenerqueue - a collection where the events in the window can be enqueued. protected void compactWindow()
WindowManagerexpires events that fall out of the window every EXPIRE_EVENTS_THRESHOLD so that the window does not grow too big.
compactWindow in class WindowManager<T>public boolean onTrigger()
WindowManagerThe callback invoked by the trigger policy.
onTrigger in interface TriggerHandleronTrigger in class WindowManager<T>Copyright © 2021 The Apache Software Foundation. All rights reserved.