Class Sequence

java.lang.Object
org.apache.pekko.persistence.query.Offset
org.apache.pekko.persistence.query.Sequence
All Implemented Interfaces:
Serializable, Comparable<Sequence>, scala.Equals, scala.math.Ordered<Sequence>, scala.Product

public final class Sequence extends Offset implements scala.math.Ordered<Sequence>, scala.Product, Serializable
Corresponds to an ordered sequence number for the events. Note that the corresponding offset of each event is provided in the pekko.persistence.query.EventEnvelope, which makes it possible to resume the stream at a later point from a given offset.

The offset is exclusive, i.e. the event with the exact same sequence number will not be included in the returned stream. This means that you can use the offset that is returned in EventEnvelope as the offset parameter in a subsequent query.

See Also:
  • Constructor Details

    • Sequence

      public Sequence(long value)
  • Method Details

    • apply

      public static Sequence apply(long value)
    • unapply

      public static scala.Option<Object> unapply(Sequence x$0)
    • value

      public long value()
    • compare

      public int compare(Sequence that)
      Specified by:
      compare in interface scala.math.Ordered<Sequence>
    • copy

      public Sequence copy(long value)
    • copy$default$1

      public long copy$default$1()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

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

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object