Class Watermark

  • All Implemented Interfaces:
    com.hazelcast.jet.impl.execution.BroadcastItem, com.hazelcast.jet.impl.execution.SpecialBroadcastItem

    public final class Watermark
    extends java.lang.Object
    implements com.hazelcast.jet.impl.execution.SpecialBroadcastItem
    Watermark is an item occasionally inserted into a disordered (sub)stream of timestamped items. The watermark's timestamp value has the meaning "no items will follow with timestamp less than this." The value of the watermark is always monotonically increasing in the (sub)stream, with the effect of superimposing an ordered timestamp sequence over the original disordered one. Watermark items are used by windowing processors as anchoring points where the processor knows which windows it can close and emit their aggregated results.
    Since:
    Jet 3.0
    • Constructor Summary

      Constructors 
      Constructor Description
      Watermark​(long timestamp)
      Constructs a new watermark item with 0 watermark key.
      Watermark​(long timestamp, byte key)
      Constructs a new watermark item with specified key.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      byte key()
      Returns the key of this watermark item.
      long timestamp()
      Returns the timestamp of this watermark item.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Watermark

        public Watermark​(long timestamp)
        Constructs a new watermark item with 0 watermark key.
      • Watermark

        public Watermark​(long timestamp,
                         byte key)
        Constructs a new watermark item with specified key.
    • Method Detail

      • timestamp

        public long timestamp()
        Returns the timestamp of this watermark item.
      • key

        public byte key()
        Returns the key of this watermark item.
      • equals

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

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

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