public static class WatermarkEstimators.MonotonicallyIncreasing extends java.lang.Object implements TimestampObservingWatermarkEstimator<Instant>
Note that this watermark estimator expects output timestamps in monotonically increasing order. If they are not, then the watermark will advance based upon the last observed timestamp as long as it is greater then any previously reported watermark.
| Constructor and Description |
|---|
MonotonicallyIncreasing(Instant watermark) |
| Modifier and Type | Method and Description |
|---|---|
Instant |
currentWatermark()
Return estimated output watermark.
|
Instant |
getState()
Get current state of the
WatermarkEstimator instance, which can be used to recreate the
WatermarkEstimator when processing the restriction. |
void |
observeTimestamp(Instant timestamp)
Update watermark estimate with latest output timestamp.
|
public MonotonicallyIncreasing(Instant watermark)
public void observeTimestamp(Instant timestamp)
TimestampObservingWatermarkEstimatorobserveTimestamp in interface TimestampObservingWatermarkEstimator<Instant>public Instant currentWatermark()
WatermarkEstimatorcurrentWatermark in interface WatermarkEstimator<Instant>public Instant getState()
WatermarkEstimatorWatermarkEstimator instance, which can be used to recreate the
WatermarkEstimator when processing the restriction. See DoFn.NewWatermarkEstimator for additional details.
The internal state of the estimator must not be mutated by this method.
The state returned must not be mutated.
getState in interface WatermarkEstimator<Instant>