W - The type of Windows on which this Evictor can operate.@PublicEvolving public class CountEvictor<W extends Window> extends Object implements Evictor<Object,W>
Evictor that keeps up to a certain amount of elements.| Modifier and Type | Method and Description |
|---|---|
int |
evict(Iterable<StreamRecord<Object>> elements,
int size,
W window)
Computes how many elements should be removed from the pane.
|
static <W extends Window> |
of(long maxCount)
Creates a
CountEvictor that keeps the given number of elements. |
public int evict(Iterable<StreamRecord<Object>> elements, int size, W window)
Evictorpublic static <W extends Window> CountEvictor<W> of(long maxCount)
CountEvictor that keeps the given number of elements.maxCount - The number of elements to keep in the pane.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.