Class DefaultWatermarkGenerator
java.lang.Object
com.scaleoutsoftware.collections.timewindowing.DefaultWatermarkGenerator
- All Implemented Interfaces:
WatermarkGenerator
The DefaultWatermarkGenerator does not change the default implementation of the TimeWindowing
eviction. The watermark is always set at the start time of the windowing collection, so only items
that arrive before the start time of the collection are evicted.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultWatermarkGenerator(long startTimeMs) Instantiate the WatermarkGenerator with the start time of the windowing collection. -
Method Summary
Modifier and TypeMethodDescriptionlonggenerateWatermark(long lastEventTimestampMs) Returns the start time of the windowing collection of which thisWatermarkGeneratoris associated with.
-
Constructor Details
-
DefaultWatermarkGenerator
public DefaultWatermarkGenerator(long startTimeMs) Instantiate the WatermarkGenerator with the start time of the windowing collection.- Parameters:
startTimeMs- the start time of the windowing collection.
-
-
Method Details
-
generateWatermark
public long generateWatermark(long lastEventTimestampMs) Returns the start time of the windowing collection of which thisWatermarkGeneratoris associated with.- Specified by:
generateWatermarkin interfaceWatermarkGenerator- Parameters:
lastEventTimestampMs- *ignored*- Returns:
- the start time of the windowing collection of which this watermark generator is associated with.
-