T - The type of the elements that this function can extract timestamps frompublic abstract class AscendingTimestampExtractor<T> extends Object implements TimestampExtractor<T>
| Constructor and Description |
|---|
AscendingTimestampExtractor() |
| Modifier and Type | Method and Description |
|---|---|
abstract long |
extractAscendingTimestamp(T element,
long currentTimestamp)
Extracts a timestamp from an element.
|
long |
extractTimestamp(T element,
long currentTimestamp)
Extracts a timestamp from an element.
|
long |
extractWatermark(T element,
long currentTimestamp)
Asks the extractor if it wants to emit a watermark now that it has seen the given element.
|
long |
getCurrentWatermark()
Returns the current watermark.
|
public abstract long extractAscendingTimestamp(T element, long currentTimestamp)
element - The element that the timestamp is extracted from.currentTimestamp - The current internal timestamp of the element.public final long extractTimestamp(T element, long currentTimestamp)
TimestampExtractorextractTimestamp in interface TimestampExtractor<T>element - The element that the timestamp is extracted from.currentTimestamp - The current internal timestamp of the element.public final long extractWatermark(T element, long currentTimestamp)
TimestampExtractorTimestampExtractor.extractTimestamp(T, long). With the same element. The method
can return Long.MIN_VALUE to indicate that no watermark should be emitted, a value of 0 or
greater will be emitted as a watermark if it is higher than the last-emitted watermark.extractWatermark in interface TimestampExtractor<T>element - The element that we last saw.currentTimestamp - The current timestamp of the element that we last saw.Long.MIN_VALUE if no watermark should be emitted, positive value for
emitting this value as a watermark.public final long getCurrentWatermark()
TimestampExtractorgetCurrentWatermark in interface TimestampExtractor<T>WatermarkCopyright © 2014–2016 The Apache Software Foundation. All rights reserved.