public class GlobalWindows extends NonMergingWindowFn<Object,GlobalWindow>
WindowFn that assigns all data to the same window.WindowFn.AssignContext, WindowFn.MergeContext| Constructor and Description |
|---|
GlobalWindows() |
| Modifier and Type | Method and Description |
|---|---|
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)
Returns the output timestamp to use for data depending on the given
inputTimestamp in the specified 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 given
WindowFn. |
Coder<GlobalWindow> |
windowCoder()
Returns the
Coder used for serializing the windows used
by this windowFn. |
isNonMerging, mergeWindowspopulateDisplayDatapublic Collection<GlobalWindow> assignWindows(WindowFn.AssignContext c)
WindowFnassignWindows in class WindowFn<Object,GlobalWindow>public boolean isCompatible(WindowFn<?,?> o)
WindowFnWindowFn.isCompatible in class WindowFn<Object,GlobalWindow>public Coder<GlobalWindow> windowCoder()
WindowFnCoder used for serializing the windows used
by this windowFn.windowCoder in class WindowFn<Object,GlobalWindow>public GlobalWindow getSideInputWindow(BoundedWindow window)
WindowFnAuthors of custom WindowFns should override this.
getSideInputWindow in class WindowFn<Object,GlobalWindow>public Instant getOutputTime(Instant inputTimestamp, GlobalWindow window)
WindowFninputTimestamp in the specified window.
The result of this method must be between inputTimestamp and
window.maxTimestamp() (inclusive on both sides).
This function must be monotonic across input timestamps. Specifically, if A < B,
then getOutputTime(A, window) <= getOutputTime(B, window).
For a WindowFn that doesn't produce overlapping windows, this can (and typically
should) just return inputTimestamp. In the presence of overlapping windows, it is
suggested that the result in later overlapping windows is past the end of earlier windows
so that the later windows don't prevent the watermark from
progressing past the end of the earlier window.
getOutputTime in class WindowFn<Object,GlobalWindow>