@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.
| 限定符和类型 | 类和说明 |
|---|---|
static class |
GlobalWindows.NeverTrigger
A trigger that never fires, as default Trigger for GlobalWindows.
|
WindowAssigner.WindowAssignerContext| 限定符和类型 | 方法和说明 |
|---|---|
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 在类中 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 在类中 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 在类中 WindowAssigner<Object,GlobalWindow>public boolean isEventTime()
WindowAssignertrue if elements are assigned to windows based on event time,
false otherwise.isEventTime 在类中 WindowAssigner<Object,GlobalWindow>Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.