Class GlobalWindows.EndOfStreamTrigger
java.lang.Object
org.apache.flink.streaming.api.windowing.triggers.Trigger<Object,GlobalWindow>
org.apache.flink.streaming.api.windowing.assigners.GlobalWindows.EndOfStreamTrigger
- All Implemented Interfaces:
Serializable
- Enclosing class:
- GlobalWindows
A trigger that fires iff the input stream reaches EndOfStream.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.flink.streaming.api.windowing.triggers.Trigger
Trigger.OnMergeContext, Trigger.TriggerContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear(GlobalWindow window, Trigger.TriggerContext ctx) Clears any state that the trigger might still hold for the given window.onElement(Object element, long timestamp, GlobalWindow window, Trigger.TriggerContext ctx) Called for every element that gets added to a pane.onEventTime(long time, GlobalWindow window, Trigger.TriggerContext ctx) Called when an event-time timer that was set using the trigger context fires.voidonMerge(GlobalWindow window, Trigger.OnMergeContext ctx) Called when several windows have been merged into one window by theWindowAssigner.onProcessingTime(long time, GlobalWindow window, Trigger.TriggerContext ctx) Called when a processing-time timer that was set using the trigger context fires.
-
Constructor Details
-
EndOfStreamTrigger
public EndOfStreamTrigger()
-
-
Method Details
-
onElement
public TriggerResult onElement(Object element, long timestamp, GlobalWindow window, Trigger.TriggerContext ctx) Description copied from class:TriggerCalled for every element that gets added to a pane. The result of this will determine whether the pane is evaluated to emit results.- Specified by:
onElementin classTrigger<Object,GlobalWindow> - Parameters:
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.
-
onEventTime
Description copied from class:TriggerCalled when an event-time timer that was set using the trigger context fires.- Specified by:
onEventTimein classTrigger<Object,GlobalWindow> - Parameters:
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.
-
onProcessingTime
Description copied from class:TriggerCalled when a processing-time timer that was set using the trigger context fires.- Specified by:
onProcessingTimein classTrigger<Object,GlobalWindow> - Parameters:
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.
-
clear
Description copied from class:TriggerClears any state that the trigger might still hold for the given window. This is called when a window is purged. Timers set usingTrigger.TriggerContext.registerEventTimeTimer(long)andTrigger.TriggerContext.registerProcessingTimeTimer(long)should be deleted here as well as state acquired usingTrigger.TriggerContext.getPartitionedState(StateDescriptor).- Specified by:
clearin classTrigger<Object,GlobalWindow> - Throws:
Exception
-
onMerge
Description copied from class:TriggerCalled when several windows have been merged into one window by theWindowAssigner.- Overrides:
onMergein classTrigger<Object,GlobalWindow> - Parameters:
window- The new window that results from the merge.ctx- A context object that can be used to register timer callbacks and access state.
-