类 WatermarkCountEvictionPolicy<T>
java.lang.Object
org.apache.pulsar.functions.windowing.evictors.WatermarkCountEvictionPolicy<T>
- 类型参数:
T- the type of event tracked by this policy.
- 所有已实现的接口:
EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>>
public class WatermarkCountEvictionPolicy<T>
extends Object
implements EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long,Long>>
An eviction policy that tracks count based on watermark ts and
evicts events up to the watermark based on a threshold count.
-
嵌套类概要
从接口继承的嵌套类/接口 org.apache.pulsar.functions.windowing.EvictionPolicy
EvictionPolicy.Action -
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Decides if an event should be expired from the window, processed in the current window or kept for later processing.Returns the current context that is part of this eviction policy.getState()Return runtime state to be checkpointed by the framework for restoring the eviction policy in case of failures.voidreset()Resets the eviction policy.voidrestoreState(org.apache.commons.lang3.tuple.Pair<Long, Long> state) Restore the eviction policy from the state that was earlier checkpointed by the framework.voidsetContext(EvictionContext context) Sets a context in the eviction policy that can be used while evicting the events.toString()voidTracks the event to later decide whetherEvictionPolicy.evict(Event)should evict it or not.
-
字段详细资料
-
threshold
protected final int threshold -
currentCount
-
-
构造器详细资料
-
WatermarkCountEvictionPolicy
public WatermarkCountEvictionPolicy(int count)
-
-
方法详细资料
-
evict
从接口复制的说明:EvictionPolicyDecides if an event should be expired from the window, processed in the current window or kept for later processing.- 指定者:
evict在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>> - 参数:
event- the input event- 返回:
- the
EvictionPolicy.Actionto be taken based on the input event
-
track
从接口复制的说明:EvictionPolicyTracks the event to later decide whetherEvictionPolicy.evict(Event)should evict it or not.- 指定者:
track在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>> - 参数:
event- the input event to be tracked
-
getContext
从接口复制的说明:EvictionPolicyReturns the current context that is part of this eviction policy.- 指定者:
getContext在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>> - 返回:
- the eviction context
-
setContext
从接口复制的说明:EvictionPolicySets a context in the eviction policy that can be used while evicting the events. E.g. For TimeEvictionPolicy, this could be used to set the reference timestamp.- 指定者:
setContext在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>> - 参数:
context- the eviction context
-
reset
public void reset()从接口复制的说明:EvictionPolicyResets the eviction policy.- 指定者:
reset在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>>
-
getState
从接口复制的说明:EvictionPolicyReturn runtime state to be checkpointed by the framework for restoring the eviction policy in case of failures.- 指定者:
getState在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>> - 返回:
- the state
-
restoreState
从接口复制的说明:EvictionPolicyRestore the eviction policy from the state that was earlier checkpointed by the framework.- 指定者:
restoreState在接口中EvictionPolicy<T,org.apache.commons.lang3.tuple.Pair<Long, Long>> - 参数:
state- the state
-
toString
-