Class TimeTriggerPolicy<T extends Serializable>
- java.lang.Object
-
- org.apache.heron.api.windowing.triggers.AbstractBaseTriggerPolicy<T,Void>
-
- org.apache.heron.api.windowing.triggers.TimeTriggerPolicy<T>
-
- All Implemented Interfaces:
TriggerPolicy<T,Void>
public class TimeTriggerPolicy<T extends Serializable> extends AbstractBaseTriggerPolicy<T,Void>
InvokesTriggerHandler.onTrigger()after the duration.
-
-
Field Summary
-
Fields inherited from class org.apache.heron.api.windowing.triggers.AbstractBaseTriggerPolicy
evictionPolicy, handler, started, topoConf, windowManager
-
-
Constructor Summary
Constructors Constructor Description TimeTriggerPolicy(long millis)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VoidgetState()Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.voidreset()resets the trigger policy.voidrestoreState(Void 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.StringtoString()voidtrack(Event<T> event)Tracks the event and could use this to invoke the trigger.-
Methods inherited from class org.apache.heron.api.windowing.triggers.AbstractBaseTriggerPolicy
setEvictionPolicy, setTopologyConfig, setTriggerHandler, setWindowManager
-
-
-
-
Method Detail
-
track
public void track(Event<T> event)
Description copied from interface:TriggerPolicyTracks the event and could use this to invoke the trigger.- Parameters:
event- the input event
-
reset
public void reset()
Description copied from interface:TriggerPolicyresets the trigger policy.
-
start
public void start()
Description copied from class:AbstractBaseTriggerPolicyStarts the trigger policy. This can be used during recovery to start the triggers after recovery is complete.- Specified by:
startin interfaceTriggerPolicy<T extends Serializable,Void>- Overrides:
startin classAbstractBaseTriggerPolicy<T extends Serializable,Void>
-
shutdown
public void shutdown()
Description copied from interface:TriggerPolicyAny clean up could be handled here.
-
getState
public Void getState()
Description copied from interface:TriggerPolicyReturn runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.- Returns:
- the state
-
restoreState
public void restoreState(Void state)
Description copied from interface:TriggerPolicyRestore the trigger policy from the state that was earlier checkpointed by the framework.- Parameters:
state- the state
-
-