com.google.cloud.dataflow.sdk.transforms.windowing

## Class Window.Unbound

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.windowing.Window.Unbound

Enclosing class:
  Window

    public static class Window.Unbound
    extends Object

An incomplete `Window` transform, with unbound input/output type.

Before being applied, `into(com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<? super T, ?>)` must be invoked to specify the `WindowFn` to invoke, which will also bind the input/output type of this `PTransform`.

### Method Summary

All Methods Instance Methods Concrete Methods
`<T> Window.Bound<T>` `accumulatingFiredPanes()` Returns a new `Window` `PTransform` that uses the registered WindowFn and Triggering behavior, and that accumulates elements in a pane after they are triggered.
`<T> Window.Bound<T>` `discardingFiredPanes()` Returns a new `Window` `PTransform` that uses the registered WindowFn and Triggering behavior, and that discards elements in a pane after they are triggered.
`<T> Window.Bound<T>` `into(WindowFn<? super T,?> fn)` Returns a new `Window` `PTransform` that's like this transform but that will use the given `WindowFn`, and that has its input and output types bound.
`Window.Unbound` `named(String name)` Returns a new `Window` transform that's like this transform but with the specified name.
`<T> Window.Bound<T>` `triggering(TriggerBuilder<?> trigger)` Sets a non-default trigger for this `Window` `PTransform`.
`<T> Window.Bound<T>` `withAllowedLateness(Duration allowedLateness)` Override the amount of lateness allowed for data elements in the pipeline.
`<T> Window.Bound<T>` `withAllowedLateness(Duration allowedLateness, Window.ClosingBehavior behavior)` Override the amount of lateness allowed for data elements in the pipeline.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### named

    public Window.Unbound named(String name)

Returns a new `Window` transform that's like this transform but with the specified name. Does not modify this transform. The resulting transform is still incomplete.

See the discussion of Naming in `ParDo` for more explanation.

#### into

    public <T> Window.Bound<T> into(WindowFn<? super T,?> fn)

Returns a new `Window` `PTransform` that's like this transform but that will use the given `WindowFn`, and that has its input and output types bound. Does not modify this transform. The resulting `PTransform` is sufficiently specified to be applied, but more properties can still be specified.

#### triggering

    @Experimental(value=TRIGGER)
    public <T> Window.Bound<T> triggering(TriggerBuilder<?> trigger)

Sets a non-default trigger for this `Window` `PTransform`. Elements that are assigned to a specific window will be output when the trigger fires.

`Trigger` has more details on the available triggers.

Must also specify allowed lateness using `withAllowedLateness(org.joda.time.Duration)` and accumulation mode using either `discardingFiredPanes()` or `accumulatingFiredPanes()`.

#### discardingFiredPanes

    @Experimental(value=TRIGGER)
    public <T> Window.Bound<T> discardingFiredPanes()

Returns a new `Window` `PTransform` that uses the registered WindowFn and Triggering behavior, and that discards elements in a pane after they are triggered.

Does not modify this transform. The resulting `PTransform` is sufficiently specified to be applied, but more properties can still be specified.

#### accumulatingFiredPanes

    @Experimental(value=TRIGGER)
    public <T> Window.Bound<T> accumulatingFiredPanes()

Returns a new `Window` `PTransform` that uses the registered WindowFn and Triggering behavior, and that accumulates elements in a pane after they are triggered.

Does not modify this transform. The resulting `PTransform` is sufficiently specified to be applied, but more properties can still be specified.

#### withAllowedLateness

    @Experimental(value=TRIGGER)
    public <T> Window.Bound<T> withAllowedLateness(Duration allowedLateness)

Override the amount of lateness allowed for data elements in the pipeline. Like the other properties on this `Window` operation, this will be applied at the next `GroupByKey`. Any elements that are later than this as decided by the system-maintained watermark will be dropped.

This value also determines how long state will be kept around for old windows. Once no elements will be added to a window (because this duration has passed) any state associated with the window will be cleaned up.

Depending on the trigger this may not produce a pane with `PaneInfo.isLast`. See `Window.ClosingBehavior.FIRE_IF_NON_EMPTY` for more details.

#### withAllowedLateness

    @Experimental(value=TRIGGER)
    public <T> Window.Bound<T> withAllowedLateness(Duration allowedLateness,
                                                                                Window.ClosingBehavior behavior)

Override the amount of lateness allowed for data elements in the pipeline. Like the other properties on this `Window` operation, this will be applied at the next `GroupByKey`. Any elements that are later than this as decided by the system-maintained watermark will be dropped.

This value also determines how long state will be kept around for old windows. Once no elements will be added to a window (because this duration has passed) any state associated with the window will be cleaned up.