Interface TriggerPolicy<T,S>

Type Parameters:
T - the type of the event that is tracked
All Known Implementing Classes:
CountTriggerPolicy, TimeTriggerPolicy, WatermarkCountTriggerPolicy, WatermarkTimeTriggerPolicy

public interface TriggerPolicy<T,S>
Triggers the window calculations based on the policy.
  • Method Summary

    Modifier and Type
    Method
    Description
    Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.
    void
    resets the trigger policy.
    void
    restoreState(S state)
    Restore the trigger policy from the state that was earlier checkpointed by the framework.
    void
    Any clean up could be handled here.
    void
    Starts the trigger policy.
    void
    track(Event<T> event)
    Tracks the event and could use this to invoke the trigger.
  • Method Details

    • track

      void track(Event<T> event)
      Tracks the event and could use this to invoke the trigger.
      Parameters:
      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.
      Returns:
      the state
    • restoreState

      void restoreState(S state)
      Restore the trigger policy from the state that was earlier checkpointed by the framework.
      Parameters:
      state - the state