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 class
Encodes anIntervalWindow
as 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 TypeMethodDescriptionint
boolean
contains
(IntervalWindow other) Returns whether this window contains the given window.end()
Returns the end of this window, exclusive.boolean
static Coder
<IntervalWindow> getCoder()
Returns aCoder
suitable forIntervalWindow
.int
hashCode()
boolean
intersects
(IntervalWindow other) Returns whether this window intersects the given window.boolean
isDisjoint
(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:
maxTimestamp
in 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:
compareTo
in interfaceComparable<IntervalWindow>
-
getCoder
Returns aCoder
suitable forIntervalWindow
.
-