类 TimeTriggerPolicy<T>
java.lang.Object
org.apache.pulsar.functions.windowing.triggers.TimeTriggerPolicy<T>
- 所有已实现的接口:
TriggerPolicy<T,Void>
Invokes
TriggerHandler.onTrigger() after the duration.-
构造器概要
构造器构造器说明TimeTriggerPolicy(long millis, TriggerHandler handler, EvictionPolicy<T, ?> evictionPolicy, org.apache.pulsar.functions.api.Context context) -
方法概要
修饰符和类型方法说明getState()Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.voidreset()resets the trigger policy.voidrestoreState(Void state) Restore the trigger policy from the state that was earlier checkpointed by the framework.voidshutdown()Any clean up could be handled here.voidstart()Starts the trigger policy.toString()voidTracks the event and could use this to invoke the trigger.
-
构造器详细资料
-
TimeTriggerPolicy
public TimeTriggerPolicy(long millis, TriggerHandler handler, EvictionPolicy<T, ?> evictionPolicy, org.apache.pulsar.functions.api.Context context)
-
-
方法详细资料
-
track
从接口复制的说明:TriggerPolicyTracks the event and could use this to invoke the trigger.- 指定者:
track在接口中TriggerPolicy<T,Void> - 参数:
event- the input event
-
reset
public void reset()从接口复制的说明:TriggerPolicyresets the trigger policy.- 指定者:
reset在接口中TriggerPolicy<T,Void>
-
start
public void start()从接口复制的说明:TriggerPolicyStarts the trigger policy. This can be used during recovery to start the triggers after recovery is complete.- 指定者:
start在接口中TriggerPolicy<T,Void>
-
shutdown
public void shutdown()从接口复制的说明:TriggerPolicyAny clean up could be handled here.- 指定者:
shutdown在接口中TriggerPolicy<T,Void>
-
toString
-
getState
从接口复制的说明:TriggerPolicyReturn runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.- 指定者:
getState在接口中TriggerPolicy<T,Void> - 返回:
- the state
-
restoreState
从接口复制的说明:TriggerPolicyRestore the trigger policy from the state that was earlier checkpointed by the framework.- 指定者:
restoreState在接口中TriggerPolicy<T,Void> - 参数:
state- the state
-