public abstract class TVFSlidingWindowFn extends NonMergingWindowFn<java.lang.Object,IntervalWindow>
WindowFn.AssignContext, WindowFn.MergeContext
Constructor and Description |
---|
TVFSlidingWindowFn() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<IntervalWindow> |
assignWindows(WindowFn.AssignContext c)
Given a timestamp and element, returns the set of windows into which it should be placed.
|
WindowMappingFn<IntervalWindow> |
getDefaultWindowMappingFn()
Returns the default
WindowMappingFn to use to map main input windows to side input
windows. |
abstract Duration |
getPeriod()
Amount of time between generated windows.
|
abstract Duration |
getSize()
Size of the generated windows.
|
boolean |
isCompatible(WindowFn<?,?> other)
Returns whether this performs the same merging as the given
WindowFn . |
static TVFSlidingWindowFn |
of(Duration size,
Duration period) |
Coder<IntervalWindow> |
windowCoder()
Returns the
Coder used for serializing the windows used by this windowFn. |
isNonMerging, mergeWindows
assignsToOneWindow, getWindowTypeDescriptor, populateDisplayData, verifyCompatibility
public abstract Duration getSize()
public abstract Duration getPeriod()
public static TVFSlidingWindowFn of(Duration size, Duration period)
public java.util.Collection<IntervalWindow> assignWindows(WindowFn.AssignContext c) throws java.lang.Exception
WindowFn
assignWindows
in class WindowFn<java.lang.Object,IntervalWindow>
java.lang.Exception
public boolean isCompatible(WindowFn<?,?> other)
WindowFn
WindowFn
.isCompatible
in class WindowFn<java.lang.Object,IntervalWindow>
public Coder<IntervalWindow> windowCoder()
WindowFn
Coder
used for serializing the windows used by this windowFn.windowCoder
in class WindowFn<java.lang.Object,IntervalWindow>
public WindowMappingFn<IntervalWindow> getDefaultWindowMappingFn()
WindowFn
WindowMappingFn
to use to map main input windows to side input
windows. This should accept arbitrary main input windows, and produce a BoundedWindow
that can be produced by this WindowFn
.getDefaultWindowMappingFn
in class WindowFn<java.lang.Object,IntervalWindow>