T - The type of elements that this Evictor can evict.W - The type of Windows on which this Evictor can operate.@PublicEvolving public interface Evictor<T,W extends Window> extends Serializable
Evictor can remove elements from a pane before it is being processed and after
window evaluation was triggered by a
Trigger.
A pane is the bucket of elements that have the same key (assigned by the
KeySelector) and same Window. An element can
be in multiple panes of it was assigned to multiple windows by the
WindowAssigner. These panes all
have their own instance of the Evictor.
| 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.
|
int evict(Iterable<StreamRecord<T>> elements, int size, W window)
elements - The elements currently in the pane.size - The current number of elements in the pane.window - The WindowCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.