public static class CalendarWindows.MonthsWindows extends PartitioningWindowingFn<java.lang.Object,IntervalWindow>
WindowingFn that windows elements into periods measured by months.
By default, periods of multiple months are measured starting at the
epoch. This can be overridden with withStartingMonth(int, int).
Months start on the first day of each calendar month, unless overridden by
beginningOnDay(int).
The time zone used to determine calendar boundaries is UTC, unless this
is overridden with the withTimeZone(org.joda.time.DateTimeZone) method.
WindowingFn.AssignContext, WindowingFn.MergeContext| Modifier and Type | Method and Description |
|---|---|
IntervalWindow |
assignWindow(Instant timestamp)
Returns the single window to which elements with this timestamp belong.
|
CalendarWindows.MonthsWindows |
beginningOnDay(int dayOfMonth) |
boolean |
isCompatible(WindowingFn other)
Returns whether this performs the same merging as the given
WindowingFn. |
Coder<IntervalWindow> |
windowCoder()
Returns the
Coder used for serializing the windows used
by this windowingFn. |
CalendarWindows.MonthsWindows |
withStartingMonth(int year,
int month) |
CalendarWindows.MonthsWindows |
withTimeZone(DateTimeZone timeZone) |
assignWindowsmergeWindowspublic CalendarWindows.MonthsWindows beginningOnDay(int dayOfMonth)
public CalendarWindows.MonthsWindows withStartingMonth(int year, int month)
public CalendarWindows.MonthsWindows withTimeZone(DateTimeZone timeZone)
public IntervalWindow assignWindow(Instant timestamp)
PartitioningWindowingFnassignWindow in class PartitioningWindowingFn<java.lang.Object,IntervalWindow>public Coder<IntervalWindow> windowCoder()
WindowingFnCoder used for serializing the windows used
by this windowingFn.windowCoder in class WindowingFn<java.lang.Object,IntervalWindow>public boolean isCompatible(WindowingFn other)
WindowingFnWindowingFn.isCompatible in class WindowingFn<java.lang.Object,IntervalWindow>