Class AbstractBaseTriggerPolicy<T extends Serializable,S>
- java.lang.Object
-
- org.apache.heron.api.windowing.triggers.AbstractBaseTriggerPolicy<T,S>
-
- All Implemented Interfaces:
TriggerPolicy<T,S>
- Direct Known Subclasses:
CountTriggerPolicy,TimeTriggerPolicy,WatermarkCountTriggerPolicy,WatermarkTimeTriggerPolicy
public abstract class AbstractBaseTriggerPolicy<T extends Serializable,S> extends Object implements TriggerPolicy<T,S>
-
-
Field Summary
Fields Modifier and Type Field Description protected EvictionPolicy<T,?>evictionPolicyprotected TriggerHandlerhandlerprotected Booleanstartedprotected Map<String,Object>topoConfprotected WindowManager<T>windowManager
-
Constructor Summary
Constructors Constructor Description AbstractBaseTriggerPolicy()Set the requirements in the constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidsetEvictionPolicy(EvictionPolicy<T,?> evictionPolicy)Set the eviction policy to whatever eviction policy to use this withvoidsetTopologyConfig(Map<String,Object> config)Sets the Config used for this topologyvoidsetTriggerHandler(TriggerHandler triggerHandler)Set the trigger handler for this trigger policy to triggervoidsetWindowManager(WindowManager<T> windowManager)Sets the window manager that uses this trigger policyvoidstart()Starts the trigger policy.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.heron.api.windowing.TriggerPolicy
getState, reset, restoreState, shutdown, track
-
-
-
-
Field Detail
-
handler
protected TriggerHandler handler
-
evictionPolicy
protected EvictionPolicy<T extends Serializable,?> evictionPolicy
-
windowManager
protected WindowManager<T extends Serializable> windowManager
-
started
protected Boolean started
-
-
Method Detail
-
setEvictionPolicy
public void setEvictionPolicy(EvictionPolicy<T,?> evictionPolicy)
Set the eviction policy to whatever eviction policy to use this with- Specified by:
setEvictionPolicyin interfaceTriggerPolicy<T extends Serializable,S>- Parameters:
evictionPolicy- the eviction policy
-
setTriggerHandler
public void setTriggerHandler(TriggerHandler triggerHandler)
Set the trigger handler for this trigger policy to trigger- Specified by:
setTriggerHandlerin interfaceTriggerPolicy<T extends Serializable,S>- Parameters:
triggerHandler- the trigger handler
-
setWindowManager
public void setWindowManager(WindowManager<T> windowManager)
Sets the window manager that uses this trigger policy- Specified by:
setWindowManagerin interfaceTriggerPolicy<T extends Serializable,S>- Parameters:
windowManager- the window manager
-
setTopologyConfig
public void setTopologyConfig(Map<String,Object> config)
Sets the Config used for this topology- Specified by:
setTopologyConfigin interfaceTriggerPolicy<T extends Serializable,S>- Parameters:
config- the configuration object
-
start
public void start()
Starts the trigger policy. This can be used during recovery to start the triggers after recovery is complete.- Specified by:
startin interfaceTriggerPolicy<T extends Serializable,S>
-
-