Google Cloud Dataflow SDK for Java, version 1.9.1
com.google.cloud.dataflow.sdk.transforms.windowing
Class GlobalWindows
- java.lang.Object
-
- com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<T,W>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn<Object,GlobalWindow>
-
- com.google.cloud.dataflow.sdk.transforms.windowing.GlobalWindows
-
- All Implemented Interfaces:
- HasDisplayData, Serializable
public class GlobalWindows extends NonMergingWindowFn<Object,GlobalWindow>
DefaultWindowFn
that assigns all data to the same window.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn
WindowFn.AssignContext, WindowFn.MergeContext
-
-
Constructor Summary
Constructors Constructor and Description GlobalWindows()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description boolean
assignsToSingleWindow()
Returns true if thisWindowFn
assigns each element to a single window.Collection<GlobalWindow>
assignWindows(WindowFn.AssignContext c)
Given a timestamp and element, returns the set of windows into which it should be placed.Instant
getOutputTime(Instant inputTimestamp, GlobalWindow window)
GlobalWindow
getSideInputWindow(BoundedWindow window)
Returns the window of the side input corresponding to the given window of the main input.boolean
isCompatible(WindowFn<?,?> o)
Returns whether this performs the same merging as the givenWindowFn
.Coder<GlobalWindow>
windowCoder()
Returns theCoder
used for serializing the windows used by this windowFn.-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn
isNonMerging, mergeWindows
-
Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn
getOutputTimeFn, populateDisplayData
-
-
-
-
Method Detail
-
assignWindows
public Collection<GlobalWindow> assignWindows(WindowFn.AssignContext c)
Description copied from class:WindowFn
Given a timestamp and element, returns the set of windows into which it should be placed.- Specified by:
assignWindows
in classWindowFn<Object,GlobalWindow>
-
isCompatible
public boolean isCompatible(WindowFn<?,?> o)
Description copied from class:WindowFn
Returns whether this performs the same merging as the givenWindowFn
.- Specified by:
isCompatible
in classWindowFn<Object,GlobalWindow>
-
windowCoder
public Coder<GlobalWindow> windowCoder()
Description copied from class:WindowFn
Returns theCoder
used for serializing the windows used by this windowFn.- Specified by:
windowCoder
in classWindowFn<Object,GlobalWindow>
-
getSideInputWindow
public GlobalWindow getSideInputWindow(BoundedWindow window)
Description copied from class:WindowFn
Returns the window of the side input corresponding to the given window of the main input.Authors of custom
WindowFn
s should override this.- Specified by:
getSideInputWindow
in classWindowFn<Object,GlobalWindow>
-
assignsToSingleWindow
public boolean assignsToSingleWindow()
Description copied from class:WindowFn
Returns true if thisWindowFn
assigns each element to a single window.- Overrides:
assignsToSingleWindow
in classWindowFn<Object,GlobalWindow>
-
getOutputTime
public Instant getOutputTime(Instant inputTimestamp, GlobalWindow window)
- Overrides:
getOutputTime
in classWindowFn<Object,GlobalWindow>
-
-