Class WatermarkMonotonicInterval

java.lang.Object
org.nuxeo.lib.stream.computation.internals.WatermarkMonotonicInterval

public class WatermarkMonotonicInterval extends Object
Keep track of minimum and maximum watermark level. On checkpoint move the low watermark to the previous maximum mark.
Since:
9.3
  • Field Details

  • Constructor Details

    • WatermarkMonotonicInterval

      public WatermarkMonotonicInterval()
  • Method Details

    • mark

      public long mark(long watermarkValue)
      Take in account the watermark.
      Implementation Note:
      Not thread safe.
    • mark

      public long mark(Watermark watermark)
      Take in account the watermark.
      Implementation Note:
      Not thread safe.
    • checkpoint

      public long checkpoint()
      Move the low watermark to the highest mark. Returns the low watermark that should be monotonic (the value returned here never decrease).
      Implementation Note:
      Not thread safe.
    • isDone

      public boolean isDone(long timestamp)
    • getLow

      public Watermark getLow()
      Returns the low mark. The value can decrease but not under the last checkpoint value.
      Implementation Note:
      Thread safe usage.
    • getHigh

      public Watermark getHigh()
    • toString

      public String toString()
      Overrides:
      toString in class Object