Package org.apache.storm.windowing
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 SummaryModifier and TypeMethodDescriptiongetState()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.
- 
Method Details- 
trackTracks the event and could use this to invoke the trigger.- Parameters:
- event- the input event
 
- 
resetvoid reset()resets the trigger policy.
- 
startvoid start()Starts the trigger policy. This can be used during recovery to start the triggers after recovery is complete.
- 
shutdownvoid shutdown()Any clean up could be handled here.
- 
getStateS getState()Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.- Returns:
- the state
 
- 
restoreStateRestore the trigger policy from the state that was earlier checkpointed by the framework.- Parameters:
- state- the state
 
 
-