public class WatermarkTimeEvictionPolicy<T> extends TimeEvictionPolicy<T>
EvictionPolicy.Action
evictionContext
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.
|
String |
toString() |
getContext, getState, reset, restoreState, setContext, track
public 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 String toString()
toString
in class TimeEvictionPolicy<T>
Copyright © 2023 The Apache Software Foundation. All rights reserved.