public class TimeTriggerPolicy<T> extends Object implements TriggerPolicy<T,Void>
TriggerHandler.onTrigger() after the duration.| Constructor and Description |
|---|
TimeTriggerPolicy(long millis,
TriggerHandler handler) |
TimeTriggerPolicy(long millis,
TriggerHandler handler,
EvictionPolicy<T,?> evictionPolicy) |
| Modifier and Type | Method and Description |
|---|---|
Void |
getState()
Return runtime state to be checkpointed by the framework for restoring the trigger policy in case of failures.
|
void |
reset()
resets the trigger policy.
|
void |
restoreState(Void state)
Restore the trigger policy from the state that was earlier checkpointed by the framework.
|
void |
shutdown()
Any clean up could be handled here.
|
void |
start()
Starts the trigger policy.
|
String |
toString() |
void |
track(Event<T> event)
Tracks the event and could use this to invoke the trigger.
|
public TimeTriggerPolicy(long millis,
TriggerHandler handler)
public TimeTriggerPolicy(long millis,
TriggerHandler handler,
EvictionPolicy<T,?> evictionPolicy)
public void track(Event<T> event)
TriggerPolicytrack in interface TriggerPolicy<T,Void>event - the input eventpublic void reset()
TriggerPolicyreset in interface TriggerPolicy<T,Void>public void start()
TriggerPolicystart in interface TriggerPolicy<T,Void>public void shutdown()
TriggerPolicyshutdown in interface TriggerPolicy<T,Void>public Void getState()
TriggerPolicygetState in interface TriggerPolicy<T,Void>public void restoreState(Void state)
TriggerPolicyrestoreState in interface TriggerPolicy<T,Void>state - the stateCopyright © 2023 The Apache Software Foundation. All rights reserved.