Interface WatermarkGenerator<T>
-
- All Known Implementing Classes:
AscendingTimestampsWatermarks,BoundedOutOfOrdernessWatermarks,NoWatermarksGenerator,WatermarksWithIdleness
@Public public interface WatermarkGenerator<T>TheWatermarkGeneratorgenerates watermarks either based on events or periodically (in a fixed interval).Note: This WatermarkGenerator subsumes the previous distinction between the
AssignerWithPunctuatedWatermarksand theAssignerWithPeriodicWatermarks.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonEvent(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.voidonPeriodicEmit(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().
-
-