W - The type of Windows on which this trigger can operate.public class ContinuousEventTimeTrigger<W extends Window> extends Object implements Trigger<Object,W>
Trigger that continuously fires based on a given time interval. This fires based
on Watermarks.Watermark,
Serialized FormTrigger.TriggerContext, Trigger.TriggerResult| Modifier and Type | Method and Description |
|---|---|
long |
getInterval() |
static <W extends Window> |
of(AbstractTime interval)
Creates a trigger that continuously fires based on the given interval.
|
Trigger.TriggerResult |
onElement(Object 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(Object element, long timestamp, W window, Trigger.TriggerContext ctx) throws Exception
TriggeronElement in interface Trigger<Object,W extends Window>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.Exceptionpublic Trigger.TriggerResult onEventTime(long time, W window, Trigger.TriggerContext ctx)
TriggeronEventTime in interface Trigger<Object,W extends Window>time - The timestamp at which the timer fired.ctx - A context object that can be used to register timer callbacks.public Trigger.TriggerResult onProcessingTime(long time, W window, Trigger.TriggerContext ctx) throws Exception
Triggerpublic long getInterval()
public static <W extends Window> ContinuousEventTimeTrigger<W> of(AbstractTime interval)
W - The type of Windows on which this trigger can operate.interval - The time interval at which to fire.Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.