public class ProcessingTimeTrigger extends Object implements Trigger<Object,TimeWindow>
Trigger that fires once the current system time passes the end of the window
to which a pane belongs.Trigger.TriggerContext, Trigger.TriggerResult| Modifier and Type | Method and Description |
|---|---|
static ProcessingTimeTrigger |
create()
Creates a new trigger that fires once system time passes the end of the window.
|
Trigger.TriggerResult |
onElement(Object element,
long timestamp,
TimeWindow window,
Trigger.TriggerContext ctx)
Called for every element that gets added to a pane.
|
Trigger.TriggerResult |
onEventTime(long time,
TimeWindow window,
Trigger.TriggerContext ctx)
Called when an event-time timer that was set using the trigger context fires.
|
Trigger.TriggerResult |
onProcessingTime(long time,
TimeWindow window,
Trigger.TriggerContext ctx)
Called when a processing-time timer that was set using the trigger context fires.
|
String |
toString() |
public Trigger.TriggerResult onElement(Object element, long timestamp, TimeWindow window, Trigger.TriggerContext ctx)
TriggeronElement in interface Trigger<Object,TimeWindow>element - The element that arrived.timestamp - The timestamp of the element that arrived.window - The window to which this pane belongs.ctx - A context object that can be used to register timer callbacks.public Trigger.TriggerResult onEventTime(long time, TimeWindow window, Trigger.TriggerContext ctx) throws Exception
TriggeronEventTime in interface Trigger<Object,TimeWindow>time - The timestamp at which the timer fired.ctx - A context object that can be used to register timer callbacks.Exceptionpublic Trigger.TriggerResult onProcessingTime(long time, TimeWindow window, Trigger.TriggerContext ctx)
TriggeronProcessingTime in interface Trigger<Object,TimeWindow>time - The timestamp at which the timer fired.ctx - A context object that can be used to register timer callbacks.public static ProcessingTimeTrigger create()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.