Package org.nuxeo.lib.stream.computation
Class Watermark
- java.lang.Object
-
- org.nuxeo.lib.stream.computation.Watermark
-
- All Implemented Interfaces:
Comparable<Watermark>
public final class Watermark extends Object implements 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
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(Watermark o)
static Watermark
completedOf(Watermark watermark)
boolean
equals(Object o)
short
getSequence()
long
getTimestamp()
long
getValue()
int
hashCode()
boolean
isCompleted()
boolean
isDone(long timestamp)
static Watermark
ofNow()
static Watermark
ofTimestamp(long timestamp)
static Watermark
ofTimestamp(long timestamp, short sequence)
static Watermark
ofValue(long watermarkValue)
String
toString()
-
-
-
Method Detail
-
ofTimestamp
public static Watermark ofTimestamp(long timestamp)
-
ofTimestamp
public static Watermark ofTimestamp(long timestamp, short sequence)
-
completedOf
public static Watermark completedOf(Watermark watermark)
-
getValue
public long getValue()
-
isCompleted
public boolean isCompleted()
-
getSequence
public short getSequence()
-
getTimestamp
public long getTimestamp()
-
isDone
public boolean isDone(long timestamp)
-
compareTo
public int compareTo(Watermark o)
- Specified by:
compareTo
in interfaceComparable<Watermark>
-
-