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

## Class CalendarWindows.DaysWindows

- java.lang.Object
- - com.google.cloud.dataflow.sdk.transforms.windowing.WindowFn<T,W>
  - - com.google.cloud.dataflow.sdk.transforms.windowing.NonMergingWindowFn<T,W>
    - - com.google.cloud.dataflow.sdk.transforms.windowing.PartitioningWindowFn<Object,IntervalWindow>
      - - com.google.cloud.dataflow.sdk.transforms.windowing.CalendarWindows.DaysWindows

All Implemented Interfaces:
  HasDisplayData, Serializable

Enclosing class:
  CalendarWindows

    public static class CalendarWindows.DaysWindows
    extends PartitioningWindowFn<Object,IntervalWindow>

A `WindowFn` that windows elements into periods measured by days.

By default, periods of multiple days are measured starting at the epoch. This can be overridden with `withStartingDay(int, int, int)`.

The time zone used to determine calendar boundaries is UTC, unless this is overridden with the `withTimeZone(org.joda.time.DateTimeZone)` method.

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`

### Method Summary

All Methods Instance Methods Concrete Methods
`IntervalWindow` `assignWindow(Instant timestamp)` Returns the single window to which elements with this timestamp belong.
`int` `getNumber()`
`DateTime` `getStartDate()`
`DateTimeZone` `getTimeZone()`
`boolean` `isCompatible(WindowFn<?,?> other)` Returns whether this performs the same merging as the given `WindowFn`.
`void` `populateDisplayData(DisplayData.Builder builder)` Register display data for the given transform or component.
`Coder<IntervalWindow>` `windowCoder()` Returns the `Coder` used for serializing the windows used by this windowFn.
`CalendarWindows.DaysWindows` `withStartingDay(int year, int month, int day)`
`CalendarWindows.DaysWindows` `withTimeZone(DateTimeZone timeZone)`

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

`assignsToSingleWindow, assignWindows, getOutputTime, getSideInputWindow`

### 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`

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

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

### Method Detail

#### withStartingDay

    public CalendarWindows.DaysWindows withStartingDay(int year,
                                                       int month,
                                                       int day)

#### withTimeZone

    public CalendarWindows.DaysWindows withTimeZone(DateTimeZone timeZone)

#### assignWindow

    public IntervalWindow assignWindow(Instant timestamp)

Description copied from class: `PartitioningWindowFn`
Returns the single window to which elements with this timestamp belong.

Specified by:
  `assignWindow` in class `PartitioningWindowFn<Object,IntervalWindow>`

#### windowCoder

    public Coder<IntervalWindow> 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,IntervalWindow>`

#### isCompatible

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

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

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

#### populateDisplayData

    public void populateDisplayData(DisplayData.Builder builder)

Description copied from class: `WindowFn`
Register display data for the given transform or component.

`populateDisplayData(DisplayData.Builder)` is invoked by Pipeline runners to collect display data via `DisplayData.from(HasDisplayData)`. Implementations may call `super.populateDisplayData(builder)` in order to register display data in the current namespace, but should otherwise use `subcomponent.populateDisplayData(builder)` to use the namespace of the subcomponent.

By default, does not register any display data. Implementors may override this method to provide their own display data.

Specified by:
  `populateDisplayData` in interface `HasDisplayData`
Overrides:
  `populateDisplayData` in class `WindowFn<Object,IntervalWindow>`
Parameters:
  `builder` - The builder to populate with display data.
See Also:
  `HasDisplayData`

#### getNumber

    public int getNumber()

#### getStartDate

    public DateTime getStartDate()

#### getTimeZone

    public DateTimeZone getTimeZone()