Class CountTriggerPolicy<T>

    • Method Detail

      • track

        public void track​(Event<T> event)
        Description copied from interface: TriggerPolicy
        Tracks the event and could use this to invoke the trigger.
        Specified by:
        track in interface TriggerPolicy<T,​Integer>
        Parameters:
        event - the input event
      • start

        public void start()
        Description copied from interface: TriggerPolicy
        Starts the trigger policy. This can be used during recovery to start the triggers after recovery is complete.
        Specified by:
        start in interface TriggerPolicy<T,​Integer>
      • getState

        public Integer getState()
        Description copied from interface: TriggerPolicy
        Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.
        Specified by:
        getState in interface TriggerPolicy<T,​Integer>
        Returns:
        the state
      • restoreState

        public void restoreState​(Integer state)
        Description copied from interface: TriggerPolicy
        Restore the trigger policy from the state that was earlier checkpointed by the framework.
        Specified by:
        restoreState in interface TriggerPolicy<T,​Integer>
        Parameters:
        state - the state