Class GlobalWindows
- java.lang.Object
-
- org.apache.flink.streaming.api.windowing.assigners.WindowAssigner<Object,GlobalWindow>
-
- org.apache.flink.streaming.api.windowing.assigners.GlobalWindows
-
- All Implemented Interfaces:
Serializable
@PublicEvolving public class GlobalWindows extends WindowAssigner<Object,GlobalWindow>
AWindowAssignerthat assigns all elements to the sameGlobalWindow.Use this if you want to use a
TriggerandEvictorto do flexible, policy based windows.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classGlobalWindows.NeverTriggerA trigger that never fires, as default Trigger for GlobalWindows.-
Nested classes/interfaces inherited from class org.apache.flink.streaming.api.windowing.assigners.WindowAssigner
WindowAssigner.WindowAssignerContext
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<GlobalWindow>assignWindows(Object element, long timestamp, WindowAssigner.WindowAssignerContext context)Returns aCollectionof windows that should be assigned to the element.static GlobalWindowscreate()Trigger<Object,GlobalWindow>getDefaultTrigger(StreamExecutionEnvironment env)Returns the default trigger associated with thisWindowAssigner.org.apache.flink.api.common.typeutils.TypeSerializer<GlobalWindow>getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)Returns aTypeSerializerfor serializing windows that are assigned by thisWindowAssigner.booleanisEventTime()Returnstrueif elements are assigned to windows based on event time,falseotherwise.StringtoString()
-
-
-
Method Detail
-
assignWindows
public Collection<GlobalWindow> assignWindows(Object element, long timestamp, WindowAssigner.WindowAssignerContext context)
Description copied from class:WindowAssignerReturns aCollectionof windows that should be assigned to the element.- Specified by:
assignWindowsin classWindowAssigner<Object,GlobalWindow>- Parameters:
element- The element to which windows should be assigned.timestamp- The timestamp of the element.context- TheWindowAssigner.WindowAssignerContextin which the assigner operates.
-
getDefaultTrigger
public Trigger<Object,GlobalWindow> getDefaultTrigger(StreamExecutionEnvironment env)
Description copied from class:WindowAssignerReturns the default trigger associated with thisWindowAssigner.- Specified by:
getDefaultTriggerin classWindowAssigner<Object,GlobalWindow>
-
create
public static GlobalWindows create()
- Returns:
- The global window policy.
-
getWindowSerializer
public org.apache.flink.api.common.typeutils.TypeSerializer<GlobalWindow> getWindowSerializer(org.apache.flink.api.common.ExecutionConfig executionConfig)
Description copied from class:WindowAssignerReturns aTypeSerializerfor serializing windows that are assigned by thisWindowAssigner.- Specified by:
getWindowSerializerin classWindowAssigner<Object,GlobalWindow>
-
isEventTime
public boolean isEventTime()
Description copied from class:WindowAssignerReturnstrueif elements are assigned to windows based on event time,falseotherwise.- Specified by:
isEventTimein classWindowAssigner<Object,GlobalWindow>
-
-