Interface Evictor<T,W extends Window>
-
- Type Parameters:
T
- The type of elements that thisEvictor
can evict.W
- The type ofWindows
on which thisEvictor
can operate.
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CountEvictor
,DeltaEvictor
,TimeEvictor
@PublicEvolving public interface Evictor<T,W extends Window> extends Serializable
AnEvictor
can remove elements from a pane before/after the evaluation of WindowFunction and after the window evaluation gets triggered by aTrigger
A pane is the bucket of elements that have the same key (assigned by the
KeySelector
) and sameWindow
. An element can be in multiple panes of it was assigned to multiple windows by theWindowAssigner
. These panes all have their own instance of theEvictor
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
Evictor.EvictorContext
A context object that is given toEvictor
methods.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.
-
-
-
Method Detail
-
evictBefore
void evictBefore(Iterable<TimestampedValue<T>> elements, int size, W window, Evictor.EvictorContext evictorContext)
Optionally evicts elements. Called before windowing function.- Parameters:
elements
- The elements currently in the pane.size
- The current number of elements in the pane.window
- TheWindow
evictorContext
- The context for the Evictor
-
evictAfter
void evictAfter(Iterable<TimestampedValue<T>> elements, int size, W window, Evictor.EvictorContext evictorContext)
Optionally evicts elements. Called after windowing function.- Parameters:
elements
- The elements currently in the pane.size
- The current number of elements in the pane.window
- TheWindow
evictorContext
- The context for the Evictor
-
-