@Internal public class WindowedValues extends java.lang.Object
WindowedValue
and static utility methods.
These are primarily intended for internal use by Beam SDK developers and runner developers. Backwards incompatible changes will likely occur.
Modifier and Type | Class and Description |
---|---|
static class |
WindowedValues.FullWindowedValueCoder<T>
Coder for
WindowedValue . |
static class |
WindowedValues.ParamWindowedValueCoder<T>
A parameterized coder for
WindowedValue . |
static interface |
WindowedValues.SingleWindowedValue
A
WindowedValues which holds exactly single window per value. |
static class |
WindowedValues.ValueOnlyWindowedValueCoder<T>
Deprecated.
Use ParamWindowedValueCoder instead, it is a general purpose implementation of the
same concept but makes timestamp, windows and pane info configurable.
|
static class |
WindowedValues.WindowedValueCoder<T>
Abstract class for
WindowedValue coder. |
Modifier and Type | Method and Description |
---|---|
static <T> boolean |
equals(@Nullable WindowedValue<T> left,
@Nullable WindowedValue<T> right) |
static <T> WindowedValues.FullWindowedValueCoder<T> |
getFullCoder(Coder<T> valueCoder,
Coder<? extends BoundedWindow> windowCoder)
Returns the
Coder to use for a WindowedValue<T> , using the given valueCoder and
windowCoder. |
static <T> WindowedValues.ParamWindowedValueCoder<T> |
getParamWindowedValueCoder(Coder<T> valueCoder)
Returns the
ParamWindowedValueCoder from the given valueCoder. |
static <T> WindowedValues.ValueOnlyWindowedValueCoder<T> |
getValueOnlyCoder(Coder<T> valueCoder)
Returns the
ValueOnlyCoder from the given valueCoder. |
static <T> int |
hashCode(WindowedValue<T> windowedValue) |
static <T> WindowedValue<T> |
of(T value,
Instant timestamp,
BoundedWindow window,
PaneInfo paneInfo)
Returns a
WindowedValue with the given value, timestamp, and window. |
static <T> WindowedValue<T> |
of(T value,
Instant timestamp,
java.util.Collection<? extends BoundedWindow> windows,
PaneInfo paneInfo)
Returns a
WindowedValue with the given value, timestamp, and windows. |
static <T> WindowedValue<T> |
timestampedValueInGlobalWindow(T value,
Instant timestamp)
Returns a
WindowedValue with the given value and timestamp, GlobalWindow and
default pane. |
static <T> WindowedValue<T> |
timestampedValueInGlobalWindow(T value,
Instant timestamp,
PaneInfo paneInfo)
Returns a
WindowedValue with the given value, timestamp, and pane in the GlobalWindow . |
static <T> WindowedValue<T> |
valueInGlobalWindow(T value)
Returns a
WindowedValue with the given value in the GlobalWindow using the
default timestamp and pane. |
static <T> WindowedValue<T> |
valueInGlobalWindow(T value,
PaneInfo paneInfo)
Returns a
WindowedValue with the given value in the GlobalWindow using the
default timestamp and the specified pane. |
static <OldT,NewT> |
withValue(WindowedValue<OldT> windowedValue,
NewT newValue)
Returns a new
WindowedValue that is a copy of this one, but with a different value,
which may have a new type NewT . |
public static <T> WindowedValue<T> of(T value, Instant timestamp, java.util.Collection<? extends BoundedWindow> windows, PaneInfo paneInfo)
WindowedValue
with the given value, timestamp, and windows.public static <T> WindowedValue<T> of(T value, Instant timestamp, BoundedWindow window, PaneInfo paneInfo)
WindowedValue
with the given value, timestamp, and window.public static <T> WindowedValue<T> valueInGlobalWindow(T value)
WindowedValue
with the given value in the GlobalWindow
using the
default timestamp and pane.public static <T> WindowedValue<T> valueInGlobalWindow(T value, PaneInfo paneInfo)
WindowedValue
with the given value in the GlobalWindow
using the
default timestamp and the specified pane.public static <T> WindowedValue<T> timestampedValueInGlobalWindow(T value, Instant timestamp)
WindowedValue
with the given value and timestamp, GlobalWindow
and
default pane.public static <T> WindowedValue<T> timestampedValueInGlobalWindow(T value, Instant timestamp, PaneInfo paneInfo)
WindowedValue
with the given value, timestamp, and pane in the GlobalWindow
.public static <OldT,NewT> WindowedValue<NewT> withValue(WindowedValue<OldT> windowedValue, NewT newValue)
WindowedValue
that is a copy of this one, but with a different value,
which may have a new type NewT
.public static <T> boolean equals(@Nullable WindowedValue<T> left, @Nullable WindowedValue<T> right)
public static <T> int hashCode(WindowedValue<T> windowedValue)
public static <T> WindowedValues.FullWindowedValueCoder<T> getFullCoder(Coder<T> valueCoder, Coder<? extends BoundedWindow> windowCoder)
Coder
to use for a WindowedValue<T>
, using the given valueCoder and
windowCoder.public static <T> WindowedValues.ValueOnlyWindowedValueCoder<T> getValueOnlyCoder(Coder<T> valueCoder)
ValueOnlyCoder
from the given valueCoder.public static <T> WindowedValues.ParamWindowedValueCoder<T> getParamWindowedValueCoder(Coder<T> valueCoder)
ParamWindowedValueCoder
from the given valueCoder.