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, toString
public StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener)
public StatefulWindowManager(WindowLifecycleListener<T> lifecycleListener, Collection<Event<T>> queue)
Constructs a StatefulWindowManager
lifecycleListener
- the WindowLifecycleListener
queue
- a collection where the events in the window can be enqueued. protected void compactWindow()
WindowManager
expires 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()
WindowManager
The callback invoked by the trigger policy.
onTrigger
in interface TriggerHandler
onTrigger
in class WindowManager<T>
Copyright © 2019 The Apache Software Foundation. All rights reserved.