Class WatermarksWithIdleness<T>

  • All Implemented Interfaces:
    WatermarkGenerator<T>

    @Public
    public class WatermarksWithIdleness<T>
    extends Object
    implements WatermarkGenerator<T>
    A WatermarkGenerator that adds idleness detection to another WatermarkGenerator. If no events come within a certain time (timeout duration) then this generator marks the stream as idle, until the next watermark is generated.
    • Constructor Detail

      • WatermarksWithIdleness

        public WatermarksWithIdleness​(WatermarkGenerator<T> watermarks,
                                      java.time.Duration idleTimeout,
                                      RelativeClock clock)
        Creates a new WatermarksWithIdleness generator to the given generator idleness detection with the given timeout.
        Parameters:
        watermarks - The original watermark generator.
        idleTimeout - The timeout for the idleness detection.
        clock - The clock that will be used to measure idleness period. It is expected that this clock will hide periods when this WatermarkGenerator has been blocked from making any progress despite availability of records on the input.