public final class PaneInfo
extends java.lang.Object
DoFn.ProcessContext#pane
method of the
context passed to a DoFn.ProcessElement
method.
Note: This does not uniquely identify a pane, and should not be used for comparisons.
Modifier and Type | Class and Description |
---|---|
static class |
PaneInfo.PaneInfoCoder
A Coder for encoding PaneInfo instances.
|
static class |
PaneInfo.Timing
Enumerates the possibilities for the timing of this pane firing related to the input and output
watermarks for its computation.
|
Modifier and Type | Field and Description |
---|---|
static PaneInfo |
NO_FIRING
PaneInfo to use for elements on (and before) initial window assignment (including
elements read from sources) before they have passed through a GroupByKey and are
associated with a particular trigger firing. |
static PaneInfo |
ON_TIME_AND_ONLY_FIRING
PaneInfo to use when there will be exactly one firing and it is on time. |
Modifier and Type | Method and Description |
---|---|
static PaneInfo |
createPane(boolean isFirst,
boolean isLast,
PaneInfo.Timing timing) |
static PaneInfo |
createPane(boolean isFirst,
boolean isLast,
PaneInfo.Timing timing,
long index,
long onTimeIndex)
Factory method to create a
PaneInfo with the specified parameters. |
static PaneInfo |
decodePane(byte encodedPane) |
boolean |
equals(@Nullable java.lang.Object obj) |
long |
getIndex()
The zero-based index of this trigger firing that produced this pane.
|
long |
getNonSpeculativeIndex()
The zero-based index of this trigger firing among non-speculative panes.
|
PaneInfo.Timing |
getTiming()
Return the timing of this pane.
|
int |
hashCode() |
boolean |
isFirst()
Return true if this is the first pane produced for the associated window.
|
boolean |
isLast()
Return true if this is the last pane that will be produced in the associated window.
|
boolean |
isUnknown()
Return true if there is no timing information for the current
PaneInfo . |
java.lang.String |
toString() |
public static final PaneInfo NO_FIRING
PaneInfo
to use for elements on (and before) initial window assignment (including
elements read from sources) before they have passed through a GroupByKey
and are
associated with a particular trigger firing.public static final PaneInfo ON_TIME_AND_ONLY_FIRING
PaneInfo
to use when there will be exactly one firing and it is on time.public static PaneInfo createPane(boolean isFirst, boolean isLast, PaneInfo.Timing timing)
public static PaneInfo createPane(boolean isFirst, boolean isLast, PaneInfo.Timing timing, long index, long onTimeIndex)
PaneInfo
with the specified parameters.public static PaneInfo decodePane(byte encodedPane)
public boolean isUnknown()
PaneInfo
. This typically
indicates that the current element has not been assigned to windows or passed through an
operation that executes triggers yet.public boolean isFirst()
public boolean isLast()
public PaneInfo.Timing getTiming()
public long getIndex()
This will return 0 for the first time the timer fires, 1 for the next time, etc.
A given (key, window, pane-index) is guaranteed to be unique in the output of a group-by-key operation.
public long getNonSpeculativeIndex()
This will return 0 for the first non-PaneInfo.Timing.EARLY
timer firing, 1 for the next one,
etc.
Always -1 for speculative data.
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(@Nullable java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object