Class Watermark


  • public class Watermark
    extends java.lang.Object
    Represents a serializable Watermark. A watermark represents a window on time with corresponding stream cut position that indicates to readers where they in a stream are vis-a-vis time provided by writers. The lower time bound is a timestamp which is less than or equal to the most recent value provided by any writer. The upper time bound is a timestamp which is greater than or equal to any time that were provided by any writer. Stream cut is an upper bound on most recent positions provided by all writer.
    • Field Detail

      • SERIALIZER

        public static final io.pravega.shared.watermarks.Watermark.WatermarkSerializer SERIALIZER
    • Constructor Detail

      • Watermark

        public Watermark​(long lowerTimeBound,
                         long upperTimeBound,
                         java.util.Map<SegmentWithRange,​java.lang.Long> streamCut)
    • Method Detail

      • fromByteBuf

        public static Watermark fromByteBuf​(java.nio.ByteBuffer data)
      • toByteBuf

        public java.nio.ByteBuffer toByteBuf()
      • getLowerTimeBound

        public long getLowerTimeBound()
      • getUpperTimeBound

        public long getUpperTimeBound()
      • getStreamCut

        public java.util.Map<SegmentWithRange,​java.lang.Long> getStreamCut()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object