@PublicEvolving public class GlobalWindows extends WindowAssigner<Object,GlobalWindow>
WindowAssigner that assigns all elements to the same GlobalWindow.
Use this if you want to use a Trigger and Evictor to do flexible, policy based windows.
| Modifier and Type | Class and Description |
|---|---|
static class |
GlobalWindows.NeverTrigger
A trigger that never fires, as default Trigger for GlobalWindows.
|
WindowAssigner.WindowAssignerContext| Modifier and Type | Method and Description |
|---|---|
Collection<GlobalWindow> |
assignWindows(Object element,
long timestamp,
WindowAssigner.WindowAssignerContext context)
Returns a
Collection of windows that should be assigned to the element. |
static GlobalWindows |
create()
|
Trigger<Object,GlobalWindow> |
getDefaultTrigger(StreamExecutionEnvironment env)
Returns the default trigger associated with this
WindowAssigner. |
org.apache.flink.api.common.typeutils.TypeSerializer<GlobalWindow> |
getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
Returns a
TypeSerializer for serializing windows that are assigned by this WindowAssigner. |
boolean |
isEventTime()
Returns
true if elements are assigned to windows based on event time, false
otherwise. |
String |
toString() |
public Collection<GlobalWindow> assignWindows(Object element, long timestamp, WindowAssigner.WindowAssignerContext context)
WindowAssignerCollection of windows that should be assigned to the element.assignWindows in class WindowAssigner<Object,GlobalWindow>element - The element to which windows should be assigned.timestamp - The timestamp of the element.context - The WindowAssigner.WindowAssignerContext in which the assigner operates.public Trigger<Object,GlobalWindow> getDefaultTrigger(StreamExecutionEnvironment env)
WindowAssignerWindowAssigner.getDefaultTrigger in class WindowAssigner<Object,GlobalWindow>public static GlobalWindows create()
public org.apache.flink.api.common.typeutils.TypeSerializer<GlobalWindow> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
WindowAssignerTypeSerializer for serializing windows that are assigned by this WindowAssigner.getWindowSerializer in class WindowAssigner<Object,GlobalWindow>public boolean isEventTime()
WindowAssignertrue if elements are assigned to windows based on event time, false
otherwise.isEventTime in class WindowAssigner<Object,GlobalWindow>Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.