Evictor.EvictorContext| 限定符和类型 | 方法和说明 |
|---|---|
void |
evictAfter(Iterable<TimestampedValue<Object>> elements,
int size,
W window,
Evictor.EvictorContext ctx)
Optionally evicts elements.
|
void |
evictBefore(Iterable<TimestampedValue<Object>> elements,
int size,
W window,
Evictor.EvictorContext ctx)
Optionally evicts elements.
|
static <W extends Window> |
of(long maxCount)
Creates a
CountEvictor that keeps the given number of elements. |
static <W extends Window> |
of(long maxCount,
boolean doEvictAfter)
Creates a
CountEvictor that keeps the given number of elements in the pane Eviction
is done before/after the window function based on the value of doEvictAfter. |
public void evictBefore(Iterable<TimestampedValue<Object>> elements, int size, W window, Evictor.EvictorContext ctx)
Evictorpublic void evictAfter(Iterable<TimestampedValue<Object>> elements, int size, W window, Evictor.EvictorContext ctx)
Evictorpublic static <W extends Window> CountEvictor<W> of(long maxCount)
CountEvictor that keeps the given number of elements. Eviction is done
before the window function.maxCount - The number of elements to keep in the pane.public static <W extends Window> CountEvictor<W> of(long maxCount, boolean doEvictAfter)
CountEvictor that keeps the given number of elements in the pane Eviction
is done before/after the window function based on the value of doEvictAfter.maxCount - The number of elements to keep in the pane.doEvictAfter - Whether to do eviction after the window function.Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.