T - The type of elements on which this trigger can operate.W - The type of Windows on which this trigger can operate.public class PurgingTrigger<T,W extends Window> extends Object implements Trigger<T,W>
Trigger into a purging Trigger.
When the nested trigger fires, this will return a FIRE_AND_PURGE
Trigger.TriggerResult
Trigger.TriggerContext, Trigger.TriggerResult| Modifier and Type | Method and Description |
|---|---|
Trigger<T,W> |
getNestedTrigger() |
static <T,W extends Window> |
of(Trigger<T,W> nestedTrigger)
Creates a new purging trigger from the given
Trigger. |
Trigger.TriggerResult |
onElement(T element,
long timestamp,
W window,
Trigger.TriggerContext ctx)
Called for every element that gets added to a pane.
|
Trigger.TriggerResult |
onEventTime(long time,
W window,
Trigger.TriggerContext ctx)
Called when an event-time timer that was set using the trigger context fires.
|
Trigger.TriggerResult |
onProcessingTime(long time,
W window,
Trigger.TriggerContext ctx)
Called when a processing-time timer that was set using the trigger context fires.
|
String |
toString() |
public Trigger.TriggerResult onElement(T element, long timestamp, W window, Trigger.TriggerContext ctx) throws Exception
Triggerpublic Trigger.TriggerResult onEventTime(long time, W window, Trigger.TriggerContext ctx) throws Exception
Triggerpublic Trigger.TriggerResult onProcessingTime(long time, W window, Trigger.TriggerContext ctx) throws Exception
Triggerpublic static <T,W extends Window> PurgingTrigger<T,W> of(Trigger<T,W> nestedTrigger)
Trigger.nestedTrigger - The trigger that is wrapped by this purging triggerCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.