Class WindowedValues

java.lang.Object
org.apache.beam.sdk.values.WindowedValues

@Internal public class WindowedValues extends Object
Implementations of 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.

  • Method Details

    • of

      public static <T> WindowedValue<T> of(T value, Instant timestamp, Collection<? extends BoundedWindow> windows, PaneInfo paneInfo)
      Returns a WindowedValue with the given value, timestamp, and windows.
    • of

      public static <T> WindowedValue<T> of(T value, Instant timestamp, BoundedWindow window, PaneInfo paneInfo)
      Returns a WindowedValue with the given value, timestamp, and window.
    • valueInGlobalWindow

      public static <T> WindowedValue<T> valueInGlobalWindow(T value)
      Returns a WindowedValue with the given value in the GlobalWindow using the default timestamp and pane.
    • valueInGlobalWindow

      public 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.
    • timestampedValueInGlobalWindow

      public static <T> WindowedValue<T> timestampedValueInGlobalWindow(T value, Instant timestamp)
      Returns a WindowedValue with the given value and timestamp, GlobalWindow and default pane.
    • timestampedValueInGlobalWindow

      public static <T> WindowedValue<T> timestampedValueInGlobalWindow(T value, Instant timestamp, PaneInfo paneInfo)
      Returns a WindowedValue with the given value, timestamp, and pane in the GlobalWindow.
    • withValue

      public static <OldT, NewT> WindowedValue<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.
    • equals

      public static <T> boolean equals(@Nullable WindowedValue<T> left, @Nullable WindowedValue<T> right)
    • hashCode

      public static <T> int hashCode(WindowedValue<T> windowedValue)
    • getFullCoder

      public 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.
    • getValueOnlyCoder

      public static <T> WindowedValues.ValueOnlyWindowedValueCoder<T> getValueOnlyCoder(Coder<T> valueCoder)
      Returns the ValueOnlyCoder from the given valueCoder.
    • getParamWindowedValueCoder

      public static <T> WindowedValues.ParamWindowedValueCoder<T> getParamWindowedValueCoder(Coder<T> valueCoder)
      Returns the ParamWindowedValueCoder from the given valueCoder.