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/after the evaluation of WindowFunction
and after the window evaluation gets 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.
| 限定符和类型 | 接口和说明 |
|---|---|
static interface |
Evictor.EvictorContext
A context object that is given to
Evictor methods. |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
evictAfter(Iterable<TimestampedValue<T>> elements,
int size,
W window,
Evictor.EvictorContext evictorContext)
Optionally evicts elements.
|
void |
evictBefore(Iterable<TimestampedValue<T>> elements,
int size,
W window,
Evictor.EvictorContext evictorContext)
Optionally evicts elements.
|
void evictBefore(Iterable<TimestampedValue<T>> elements, int size, W window, Evictor.EvictorContext evictorContext)
elements - The elements currently in the pane.size - The current number of elements in the pane.window - The WindowevictorContext - The context for the Evictorvoid evictAfter(Iterable<TimestampedValue<T>> elements, int size, W window, Evictor.EvictorContext evictorContext)
elements - The elements currently in the pane.size - The current number of elements in the pane.window - The WindowevictorContext - The context for the EvictorCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.