Class CalendarWindows.MonthsWindows
- java.lang.Object
-
- org.apache.beam.sdk.transforms.windowing.WindowFn<T,W>
-
- org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn<T,W>
-
- org.apache.beam.sdk.transforms.windowing.PartitioningWindowFn<java.lang.Object,org.apache.beam.sdk.transforms.windowing.IntervalWindow>
-
- cz.o2.proxima.beam.core.transforms.CalendarWindows.MonthsWindows
-
- All Implemented Interfaces:
java.io.Serializable
,org.apache.beam.sdk.transforms.display.HasDisplayData
- Enclosing class:
- CalendarWindows
public static class CalendarWindows.MonthsWindows extends org.apache.beam.sdk.transforms.windowing.PartitioningWindowFn<java.lang.Object,org.apache.beam.sdk.transforms.windowing.IntervalWindow>
AWindowFn
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(java.util.TimeZone)
method.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.beam.sdk.transforms.windowing.IntervalWindow
assignWindow(org.joda.time.Instant timestamp)
CalendarWindows.MonthsWindows
beginningOnDay(int dayOfMonth)
int
getDayOfMonth()
int
getNumber()
java.time.ZonedDateTime
getStartDate()
java.util.TimeZone
getTimeZone()
boolean
isCompatible(org.apache.beam.sdk.transforms.windowing.WindowFn<?,?> other)
void
verifyCompatibility(org.apache.beam.sdk.transforms.windowing.WindowFn<?,?> other)
org.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.transforms.windowing.IntervalWindow>
windowCoder()
CalendarWindows.MonthsWindows
withStartingMonth(int year, int month)
CalendarWindows.MonthsWindows
withTimeZone(java.util.TimeZone timeZone)
-
Methods inherited from class org.apache.beam.sdk.transforms.windowing.PartitioningWindowFn
assignsToOneWindow, assignWindows, getDefaultWindowMappingFn
-
Methods inherited from class org.apache.beam.sdk.transforms.windowing.NonMergingWindowFn
isNonMerging, mergeWindows
-
-
-
-
Method Detail
-
beginningOnDay
public CalendarWindows.MonthsWindows beginningOnDay(int dayOfMonth)
-
withStartingMonth
public CalendarWindows.MonthsWindows withStartingMonth(int year, int month)
-
withTimeZone
public CalendarWindows.MonthsWindows withTimeZone(java.util.TimeZone timeZone)
-
assignWindow
public org.apache.beam.sdk.transforms.windowing.IntervalWindow assignWindow(org.joda.time.Instant timestamp)
- Specified by:
assignWindow
in classorg.apache.beam.sdk.transforms.windowing.PartitioningWindowFn<java.lang.Object,org.apache.beam.sdk.transforms.windowing.IntervalWindow>
-
windowCoder
public org.apache.beam.sdk.coders.Coder<org.apache.beam.sdk.transforms.windowing.IntervalWindow> windowCoder()
- Specified by:
windowCoder
in classorg.apache.beam.sdk.transforms.windowing.WindowFn<java.lang.Object,org.apache.beam.sdk.transforms.windowing.IntervalWindow>
-
isCompatible
public boolean isCompatible(org.apache.beam.sdk.transforms.windowing.WindowFn<?,?> other)
- Specified by:
isCompatible
in classorg.apache.beam.sdk.transforms.windowing.WindowFn<java.lang.Object,org.apache.beam.sdk.transforms.windowing.IntervalWindow>
-
verifyCompatibility
public void verifyCompatibility(org.apache.beam.sdk.transforms.windowing.WindowFn<?,?> other) throws org.apache.beam.sdk.transforms.windowing.IncompatibleWindowException
- Overrides:
verifyCompatibility
in classorg.apache.beam.sdk.transforms.windowing.WindowFn<java.lang.Object,org.apache.beam.sdk.transforms.windowing.IntervalWindow>
- Throws:
org.apache.beam.sdk.transforms.windowing.IncompatibleWindowException
-
getNumber
public int getNumber()
-
getDayOfMonth
public int getDayOfMonth()
-
getStartDate
public java.time.ZonedDateTime getStartDate()
-
getTimeZone
public java.util.TimeZone getTimeZone()
-
-