@Internal public static class GlobalWindows.EndOfStreamTrigger extends Trigger<Object,GlobalWindow>
Trigger.OnMergeContext, Trigger.TriggerContext| Constructor and Description |
|---|
EndOfStreamTrigger() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear(GlobalWindow window,
Trigger.TriggerContext ctx)
Clears any state that the trigger might still hold for the given window.
|
TriggerResult |
onElement(Object element,
long timestamp,
GlobalWindow window,
Trigger.TriggerContext ctx)
Called for every element that gets added to a pane.
|
TriggerResult |
onEventTime(long time,
GlobalWindow window,
Trigger.TriggerContext ctx)
Called when an event-time timer that was set using the trigger context fires.
|
void |
onMerge(GlobalWindow window,
Trigger.OnMergeContext ctx)
Called when several windows have been merged into one window by the
WindowAssigner. |
TriggerResult |
onProcessingTime(long time,
GlobalWindow window,
Trigger.TriggerContext ctx)
Called when a processing-time timer that was set using the trigger context fires.
|
public TriggerResult onElement(Object element, long timestamp, GlobalWindow window, Trigger.TriggerContext ctx)
TriggeronElement in class Trigger<Object,GlobalWindow>element - The element that arrived.timestamp - The timestamp of the element that arrived.window - The window to which the element is being added.ctx - A context object that can be used to register timer callbacks.public TriggerResult onEventTime(long time, GlobalWindow window, Trigger.TriggerContext ctx)
TriggeronEventTime in class Trigger<Object,GlobalWindow>time - The timestamp at which the timer fired.window - The window for which the timer fired.ctx - A context object that can be used to register timer callbacks.public TriggerResult onProcessingTime(long time, GlobalWindow window, Trigger.TriggerContext ctx)
TriggeronProcessingTime in class Trigger<Object,GlobalWindow>time - The timestamp at which the timer fired.window - The window for which the timer fired.ctx - A context object that can be used to register timer callbacks.public void clear(GlobalWindow window, Trigger.TriggerContext ctx) throws Exception
TriggerTrigger.TriggerContext.registerEventTimeTimer(long) and
Trigger.TriggerContext.registerProcessingTimeTimer(long) should be deleted here as well as
state acquired using Trigger.TriggerContext.getPartitionedState(StateDescriptor).clear in class Trigger<Object,GlobalWindow>Exceptionpublic void onMerge(GlobalWindow window, Trigger.OnMergeContext ctx)
TriggerWindowAssigner.onMerge in class Trigger<Object,GlobalWindow>window - The new window that results from the merge.ctx - A context object that can be used to register timer callbacks and access state.Copyright © 2014–2025 The Apache Software Foundation. All rights reserved.