public class WatermarkTimeEvictionPolicy<T> extends TimeEvictionPolicy<T>
EvictionPolicy.ActionevictionContext| Constructor and Description |
|---|
WatermarkTimeEvictionPolicy(int windowLength)
Constructs a WatermarkTimeEvictionPolicy that evicts events older than the given window length
in millis.
|
WatermarkTimeEvictionPolicy(int windowLength,
int lag)
Constructs a WatermarkTimeEvictionPolicy that evicts events older than the given window length
in millis.
|
| Modifier and Type | Method and Description |
|---|---|
EvictionPolicy.Action |
evict(Event<T> event)
Decides if an event should be expired from the window, processed in the current
window or kept for later processing.
|
java.lang.String |
toString() |
getContext, getState, reset, restoreState, setContext, trackpublic WatermarkTimeEvictionPolicy(int windowLength)
windowLength - the window length in millisecondspublic WatermarkTimeEvictionPolicy(int windowLength,
int lag)
windowLength - the window length in millisecondslag - the max event lag in millisecondspublic EvictionPolicy.Action evict(Event<T> event)
evict in interface EvictionPolicy<T,EvictionContext>evict in class TimeEvictionPolicy<T>event - the input eventEvictionPolicy.Action to be taken
based on the input eventpublic java.lang.String toString()
toString in class TimeEvictionPolicy<T>