接口 TriggerPolicy<T,S>
- 类型参数:
T- the type of the event that is trackedS- the type of state that is used
- 所有已知实现类:
CountTriggerPolicy,TimeTriggerPolicy,WatermarkCountTriggerPolicy,WatermarkTimeTriggerPolicy
public interface TriggerPolicy<T,S>
Triggers the window calculations based on the policy.
-
方法概要
修饰符和类型方法说明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(S 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.voidTracks the event and could use this to invoke the trigger.
-
方法详细资料
-
track
Tracks the event and could use this to invoke the trigger.- 参数:
event- the input event
-
reset
void reset()resets the trigger policy. -
start
void start()Starts the trigger policy. This can be used during recovery to start the triggers after recovery is complete. -
shutdown
void shutdown()Any clean up could be handled here. -
getState
S getState()Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.- 返回:
- the state
-
restoreState
Restore the trigger policy from the state that was earlier checkpointed by the framework.- 参数:
state- the state
-