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

## Class GlobalWindows

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<T,W>
  - - com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn<Object,GlobalWindow>
    - - com.google.cloud.dataflow.sdk.transforms.windowing.GlobalWindows

All Implemented Interfaces:
  HasDisplayData, Serializable

    public class GlobalWindows
    extends NonMergingWindowFn<Object,GlobalWindow>

Default `WindowFn` that assigns all data to the same window.

See Also:
  Serialized Form

### Nested Class Summary

### Nested classes/interfaces inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn

`WindowFn.AssignContext, WindowFn.MergeContext`

### Constructor Summary

Constructors
Constructor and Description
`GlobalWindows()`

### Method Summary

All Methods Instance Methods Concrete Methods
`boolean` `assignsToSingleWindow()` Returns true if this `WindowFn` assigns each element to a single window.
`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)`
`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.

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn

`isNonMerging, mergeWindows`

### Methods inherited from class com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn

`getOutputTimeFn, populateDisplayData`

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

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

### Constructor Detail

#### GlobalWindows

    public GlobalWindows()

### Method Detail

#### assignWindows

    public Collection<GlobalWindow> assignWindows(WindowFn.AssignContext c)

Description copied from class: `WindowFn`
Given a timestamp and element, returns the set of windows into which it should be placed.

Specified by:
  `assignWindows` in class `WindowFn<Object,GlobalWindow>`

#### isCompatible

    public boolean isCompatible(WindowFn<?,?> o)

Description copied from class: `WindowFn`
Returns whether this performs the same merging as the given `WindowFn`.

Specified by:
  `isCompatible` in class `WindowFn<Object,GlobalWindow>`

#### windowCoder

    public Coder<GlobalWindow> windowCoder()

Description copied from class: `WindowFn`
Returns the `Coder` used for serializing the windows used by this windowFn.

Specified by:
  `windowCoder` in class `WindowFn<Object,GlobalWindow>`

#### getSideInputWindow

    public GlobalWindow getSideInputWindow(BoundedWindow window)

Description copied from class: `WindowFn`
Returns the window of the side input corresponding to the given window of the main input.

Authors of custom `WindowFn`s should override this.

Specified by:
  `getSideInputWindow` in class `WindowFn<Object,GlobalWindow>`

#### assignsToSingleWindow

    public boolean assignsToSingleWindow()

Description copied from class: `WindowFn`
Returns true if this `WindowFn` assigns each element to a single window.

Overrides:
  `assignsToSingleWindow` in class `WindowFn<Object,GlobalWindow>`

#### getOutputTime

    public Instant getOutputTime(Instant inputTimestamp,
                                 GlobalWindow window)

Overrides:
  `getOutputTime` in class `WindowFn<Object,GlobalWindow>`