Class DeltaEvictor<T,W extends org.apache.flink.streaming.api.windowing.windows.Window>
java.lang.Object
org.apache.flink.streaming.api.windowing.evictors.DeltaEvictor<T,W>
- Type Parameters:
W- The type ofWindowson which thisEvictorcan operate.
- All Implemented Interfaces:
Serializable,org.apache.flink.streaming.api.windowing.evictors.Evictor<T,W>
@PublicEvolving
public class DeltaEvictor<T,W extends org.apache.flink.streaming.api.windowing.windows.Window>
extends Object
implements org.apache.flink.streaming.api.windowing.evictors.Evictor<T,W>
An
Evictor that keeps elements based on a DeltaFunction and a threshold.
Eviction starts from the first element of the buffer and removes all elements from the buffer which have a higher delta then the threshold.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.flink.streaming.api.windowing.evictors.Evictor
org.apache.flink.streaming.api.windowing.evictors.Evictor.EvictorContext -
Method Summary
Modifier and TypeMethodDescriptionvoidevictAfter(Iterable<org.apache.flink.streaming.runtime.operators.windowing.TimestampedValue<T>> elements, int size, W window, org.apache.flink.streaming.api.windowing.evictors.Evictor.EvictorContext ctx) voidevictBefore(Iterable<org.apache.flink.streaming.runtime.operators.windowing.TimestampedValue<T>> elements, int size, W window, org.apache.flink.streaming.api.windowing.evictors.Evictor.EvictorContext ctx) static <T,W extends org.apache.flink.streaming.api.windowing.windows.Window>
DeltaEvictor<T,W> of(double threshold, DeltaFunction<T> deltaFunction) Creates aDeltaEvictorfrom the given threshold andDeltaFunction.static <T,W extends org.apache.flink.streaming.api.windowing.windows.Window>
DeltaEvictor<T,W> of(double threshold, DeltaFunction<T> deltaFunction, boolean doEvictAfter) Creates aDeltaEvictorfrom the given threshold,DeltaFunction.toString()
-
Method Details
-
evictBefore
-
evictAfter
-
toString
-
of
public static <T,W extends org.apache.flink.streaming.api.windowing.windows.Window> DeltaEvictor<T,W> of(double threshold, DeltaFunction<T> deltaFunction) Creates aDeltaEvictorfrom the given threshold andDeltaFunction. Eviction is done before the window function.- Parameters:
threshold- The thresholddeltaFunction- TheDeltaFunction
-
of
public static <T,W extends org.apache.flink.streaming.api.windowing.windows.Window> DeltaEvictor<T,W> of(double threshold, DeltaFunction<T> deltaFunction, boolean doEvictAfter) Creates aDeltaEvictorfrom the given threshold,DeltaFunction. Eviction is done before/after the window function based on the value of doEvictAfter.- Parameters:
threshold- The thresholddeltaFunction- TheDeltaFunctiondoEvictAfter- Whether eviction should be done after window function
-