public class WatermarkTimeTriggerPolicy<T> extends Object implements TriggerPolicy<T>
Handles watermark events and triggers TriggerHandler.onTrigger()
for each window interval that has events to be processed up to the watermark ts.
Constructor and Description |
---|
WatermarkTimeTriggerPolicy(long slidingIntervalMs,
TriggerHandler handler,
EvictionPolicy<T> evictionPolicy,
WindowManager<T> windowManager) |
Modifier and Type | Method and Description |
---|---|
void |
reset()
resets the trigger policy
|
void |
shutdown()
Any clean up could be handled here.
|
void |
start()
Starts the trigger policy.
|
String |
toString() |
void |
track(org.apache.storm.windowing.Event<T> event)
Tracks the event and could use this to invoke the trigger.
|
public WatermarkTimeTriggerPolicy(long slidingIntervalMs, TriggerHandler handler, EvictionPolicy<T> evictionPolicy, WindowManager<T> windowManager)
public void track(org.apache.storm.windowing.Event<T> event)
TriggerPolicy
Tracks the event and could use this to invoke the trigger.
track
in interface TriggerPolicy<T>
event
- the input eventpublic void reset()
TriggerPolicy
resets the trigger policy
reset
in interface TriggerPolicy<T>
public void start()
TriggerPolicy
Starts the trigger policy. This can be used during recovery to start the triggers after recovery is complete.
start
in interface TriggerPolicy<T>
public void shutdown()
TriggerPolicy
Any clean up could be handled here.
shutdown
in interface TriggerPolicy<T>
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.