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,?>
evictionPolicy
protected TriggerHandler
handler
protected Boolean
started
protected Map<String,Object>
topoConf
protected 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 void
setEvictionPolicy(EvictionPolicy<T,?> evictionPolicy)
Set the eviction policy to whatever eviction policy to use this withvoid
setTopologyConfig(Map<String,Object> config)
Sets the Config used for this topologyvoid
setTriggerHandler(TriggerHandler triggerHandler)
Set the trigger handler for this trigger policy to triggervoid
setWindowManager(WindowManager<T> windowManager)
Sets the window manager that uses this trigger policyvoid
start()
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:
setEvictionPolicy
in 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:
setTriggerHandler
in 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:
setWindowManager
in 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:
setTopologyConfig
in 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:
start
in interfaceTriggerPolicy<T extends Serializable,S>
-
-