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 long
checkpoint()
Move the low watermark to the highest mark.Watermark
getHigh()
Watermark
getLow()
Returns the low mark.boolean
isDone(long timestamp)
long
mark(long watermarkValue)
Take in account the watermark.long
mark(Watermark watermark)
Take in account the watermark.String
toString()
-
-
-
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()
-
-