@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 . |
TypeSerializer<GlobalWindow> |
getWindowSerializer(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)
WindowAssigner
Collection
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)
WindowAssigner
WindowAssigner
.getDefaultTrigger
in class WindowAssigner<Object,GlobalWindow>
public static GlobalWindows create()
public TypeSerializer<GlobalWindow> getWindowSerializer(ExecutionConfig executionConfig)
WindowAssigner
TypeSerializer
for serializing windows that are assigned by this WindowAssigner
.getWindowSerializer
in class WindowAssigner<Object,GlobalWindow>
public boolean isEventTime()
WindowAssigner
true
if elements are assigned to windows based on event time, false
otherwise.isEventTime
in class WindowAssigner<Object,GlobalWindow>
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.