Class DefaultWatermarkGenerator

java.lang.Object
com.scaleoutsoftware.collections.timewindowing.DefaultWatermarkGenerator
All Implemented Interfaces:
WatermarkGenerator

public class DefaultWatermarkGenerator extends Object implements 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 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 this WatermarkGenerator is associated with.
      Specified by:
      generateWatermark in interface WatermarkGenerator
      Parameters:
      lastEventTimestampMs - *ignored*
      Returns:
      the start time of the windowing collection of which this watermark generator is associated with.