public abstract class BoundedWindow
extends java.lang.Object
BoundedWindow
represents a finite grouping of elements, with an
upper bound (larger timestamps represent more recent data) on the timestamps
of elements that can be placed in the window. This finiteness means that for
every window, at some point in time, all data for that window will have
arrived and can be processed together.
Windows must also implement Object.equals(java.lang.Object)
and
Object.hashCode()
such that windows that are logically equal will
be treated as equal by equals()
and hashCode()
.
Modifier and Type | Field and Description |
---|---|
static Instant |
TIMESTAMP_MAX_VALUE
The maximum value for any Beam timestamp.
|
static Instant |
TIMESTAMP_MIN_VALUE
The minimum value for any Beam timestamp.
|
Constructor and Description |
---|
BoundedWindow() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
formatTimestamp(Instant timestamp)
Formats a
Instant timestamp with additional Beam-specific metadata, such as indicating
whether the timestamp is the end of the global window or one of the distinguished values TIMESTAMP_MIN_VALUE or TIMESTAMP_MIN_VALUE . |
abstract Instant |
maxTimestamp()
Returns the inclusive upper bound of timestamps for values in this window.
|
public static final Instant TIMESTAMP_MIN_VALUE
This value and TIMESTAMP_MAX_VALUE
are chosen so that their
microseconds-since-epoch can be safely represented with a long
.
public static final Instant TIMESTAMP_MAX_VALUE
This value and TIMESTAMP_MIN_VALUE
are chosen so that their
microseconds-since-epoch can be safely represented with a long
.
public static java.lang.String formatTimestamp(Instant timestamp)
Instant
timestamp with additional Beam-specific metadata, such as indicating
whether the timestamp is the end of the global window or one of the distinguished values TIMESTAMP_MIN_VALUE
or TIMESTAMP_MIN_VALUE
.public abstract Instant maxTimestamp()