类 TimeTriggerPolicy<T>

java.lang.Object
org.apache.pulsar.functions.windowing.triggers.TimeTriggerPolicy<T>
所有已实现的接口:
TriggerPolicy<T,Void>

public class TimeTriggerPolicy<T> extends Object implements TriggerPolicy<T,Void>
Invokes TriggerHandler.onTrigger() after the duration.
  • 构造器详细资料

    • TimeTriggerPolicy

      public TimeTriggerPolicy(long millis, TriggerHandler handler, EvictionPolicy<T,?> evictionPolicy, org.apache.pulsar.functions.api.Context context)
  • 方法详细资料

    • track

      public void track(Event<T> event)
      从接口复制的说明: TriggerPolicy
      Tracks the event and could use this to invoke the trigger.
      指定者:
      track 在接口中 TriggerPolicy<T,Void>
      参数:
      event - the input event
    • reset

      public void reset()
      从接口复制的说明: TriggerPolicy
      resets the trigger policy.
      指定者:
      reset 在接口中 TriggerPolicy<T,Void>
    • start

      public void start()
      从接口复制的说明: TriggerPolicy
      Starts 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()
      从接口复制的说明: TriggerPolicy
      Any clean up could be handled here.
      指定者:
      shutdown 在接口中 TriggerPolicy<T,Void>
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • getState

      public Void getState()
      从接口复制的说明: TriggerPolicy
      Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.
      指定者:
      getState 在接口中 TriggerPolicy<T,Void>
      返回:
      the state
    • restoreState

      public void restoreState(Void state)
      从接口复制的说明: TriggerPolicy
      Restore the trigger policy from the state that was earlier checkpointed by the framework.
      指定者:
      restoreState 在接口中 TriggerPolicy<T,Void>
      参数:
      state - the state