Package org.nuxeo.lib.stream.computation
Class Watermark
java.lang.Object
org.nuxeo.lib.stream.computation.Watermark
- All Implemented Interfaces:
Comparable<Watermark>
Watermark represents a point in time. This point in time is composed of a millisecond timestamp and a sequence. There
is also a state to denote if the point in time is reached (completed) or not. Watermark are immutable.
- Since:
- 9.3
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintstatic WatermarkcompletedOf(Watermark watermark) booleanshortlonglonggetValue()inthashCode()booleanbooleanisDone(long timestamp) static WatermarkofNow()static WatermarkofTimestamp(long timestamp) static WatermarkofTimestamp(long timestamp, short sequence) static WatermarkofValue(long watermarkValue) toString()
-
Field Details
-
LOWEST
-
timestamp
protected final long timestamp -
sequence
protected final short sequence -
completed
protected final boolean completed -
value
protected final long value
-
-
Method Details
-
ofValue
-
ofNow
-
ofTimestamp
-
ofTimestamp
-
completedOf
-
getValue
public long getValue() -
isCompleted
public boolean isCompleted() -
getSequence
public short getSequence() -
getTimestamp
public long getTimestamp() -
isDone
public boolean isDone(long timestamp) -
equals
-
hashCode
public int hashCode() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Watermark>
-