Class IntervalWindow
java.lang.Object
org.apache.beam.sdk.transforms.windowing.BoundedWindow
org.apache.beam.sdk.transforms.windowing.IntervalWindow
- All Implemented Interfaces:
Comparable<IntervalWindow>
An implementation of
BoundedWindow that represents an interval from start
(inclusive) to end (exclusive).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classEncodes anIntervalWindowas a pair of its upper bound and duration. -
Field Summary
Fields inherited from class org.apache.beam.sdk.transforms.windowing.BoundedWindow
TIMESTAMP_MAX_VALUE, TIMESTAMP_MIN_VALUE -
Constructor Summary
ConstructorsConstructorDescriptionIntervalWindow(Instant start, Instant end) Creates a new IntervalWindow that represents the half-open time interval [start, end).IntervalWindow(Instant start, ReadableDuration size) -
Method Summary
Modifier and TypeMethodDescriptionintbooleancontains(IntervalWindow other) Returns whether this window contains the given window.end()Returns the end of this window, exclusive.booleanstatic Coder<IntervalWindow> getCoder()Returns aCodersuitable forIntervalWindow.inthashCode()booleanintersects(IntervalWindow other) Returns whether this window intersects the given window.booleanisDisjoint(IntervalWindow other) Returns whether this window is disjoint from the given window.Returns the largest timestamp that can be included in this window.span(IntervalWindow other) Returns the minimal window that includes both this window and the given window.start()Returns the start of this window, inclusive.toString()Methods inherited from class org.apache.beam.sdk.transforms.windowing.BoundedWindow
formatTimestamp, validateTimestampBounds
-
Constructor Details
-
IntervalWindow
Creates a new IntervalWindow that represents the half-open time interval [start, end). -
IntervalWindow
-
-
Method Details
-
start
Returns the start of this window, inclusive. -
end
Returns the end of this window, exclusive. -
maxTimestamp
Returns the largest timestamp that can be included in this window.- Specified by:
maxTimestampin classBoundedWindow
-
contains
Returns whether this window contains the given window. -
isDisjoint
Returns whether this window is disjoint from the given window. -
intersects
Returns whether this window intersects the given window. -
span
Returns the minimal window that includes both this window and the given window. -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<IntervalWindow>
-
getCoder
Returns aCodersuitable forIntervalWindow.
-