W - The type of Windows on which this Evictor can operate.@PublicEvolving public class DeltaEvictor<T,W extends Window> extends Object implements Evictor<T,W>
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. As soon as there is an element with a lower delta, the eviction stops.
| Modifier and Type | Method and Description |
|---|---|
int |
evict(Iterable<StreamRecord<T>> elements,
int size,
W window)
Computes how many elements should be removed from the pane.
|
static <T,W extends Window> |
of(double threshold,
DeltaFunction<T> deltaFunction)
Creates a
DeltaEvictor from the given threshold and DeltaFunction. |
String |
toString() |
public int evict(Iterable<StreamRecord<T>> elements, int size, W window)
Evictorpublic static <T,W extends Window> DeltaEvictor<T,W> of(double threshold, DeltaFunction<T> deltaFunction)
DeltaEvictor from the given threshold and DeltaFunction.threshold - The thresholddeltaFunction - The DeltaFunctionCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.