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
-
-
Constructor Summary
Constructors Constructor Description WatermarkMonotonicInterval()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcheckpoint()Move the low watermark to the highest mark.WatermarkgetHigh()WatermarkgetLow()Returns the low mark.booleanisDone(long timestamp)longmark(long watermarkValue)Take in account the watermark.longmark(Watermark watermark)Take in account the watermark.StringtoString()
-
-
-
Method Detail
-
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()
-
-