Interface WatermarkGenerator<T>
-
- All Known Implementing Classes:
AscendingTimestampsWatermarks
,BoundedOutOfOrdernessWatermarks
,GeneratedWatermarkGeneratorSupplier.DefaultWatermarkGenerator
,NoWatermarksGenerator
,WatermarksWithIdleness
@Public public interface WatermarkGenerator<T>
TheWatermarkGenerator
generates watermarks either based on events or periodically (in a fixed interval).Note: This WatermarkGenerator subsumes the previous distinction between the
AssignerWithPunctuatedWatermarks
and theAssignerWithPeriodicWatermarks
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onEvent(T event, long eventTimestamp, WatermarkOutput output)
Called for every event, allows the watermark generator to examine and remember the event timestamps, or to emit a watermark based on the event itself.void
onPeriodicEmit(WatermarkOutput output)
Called periodically, and might emit a new watermark, or not.
-
-
-
Method Detail
-
onEvent
void onEvent(T event, long eventTimestamp, WatermarkOutput output)
Called for every event, allows the watermark generator to examine and remember the event timestamps, or to emit a watermark based on the event itself.
-
onPeriodicEmit
void onPeriodicEmit(WatermarkOutput output)
Called periodically, and might emit a new watermark, or not.The interval in which this method is called and Watermarks are generated depends on
ExecutionConfig.getAutoWatermarkInterval()
.
-
-