Packages

c

akka.stream.alpakka.azure.eventhubs

LocationInPartition

final case class LocationInPartition(offset: Long, sequenceNr: Long) extends PartiallyOrdered[LocationInPartition] with Product with Serializable

An event in a given partition can be identified by a sequence number, which is guaranteed to be incremented by 1 from one event to the next in a partition, and an offset, which in the current implementation is (per https://stackoverflow.com/a/66294545/5641244 from a Microsoft engineer) "the number of bytes from the beginning of the partition to the first byte of the event".

This does imply that for instances of this class which came from the same partition, their offsets and sequence numbers will compare the same (viz. (this.offset < that.offset) == (this.sequenceNr < that.sequenceNr)). However, for instances which came from different partitions, this relationship may not hold (consider one partition where most events are a few bytes while another partition where most events are larger than a hundred thousand bytes: an event with sequence number 5 in the former partition might have offset 96, while an event with sequence number 2 from the latter partition could have offset 205000).

The compareTo method does not fully obey the contract of java.lang.Comparable.compareTo.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LocationInPartition
  2. Serializable
  3. Product
  4. Equals
  5. PartiallyOrdered
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LocationInPartition(offset: Long, sequenceNr: Long)

Type Members

  1. type AsPartiallyOrdered[B] = (B) => PartiallyOrdered[B]
    Definition Classes
    PartiallyOrdered

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def <[B >: LocationInPartition](that: B)(implicit arg0: AsPartiallyOrdered[B]): Boolean
    Definition Classes
    PartiallyOrdered
  4. def <=[B >: LocationInPartition](that: B)(implicit arg0: AsPartiallyOrdered[B]): Boolean
    Definition Classes
    PartiallyOrdered
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. def >[B >: LocationInPartition](that: B)(implicit arg0: AsPartiallyOrdered[B]): Boolean
    Definition Classes
    PartiallyOrdered
  7. def >=[B >: LocationInPartition](that: B)(implicit arg0: AsPartiallyOrdered[B]): Boolean
    Definition Classes
    PartiallyOrdered
  8. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  10. def compareTo(other: LocationInPartition): Int

    Java API

    Java API

    Returns -1 if this location is considered less than the other, 1 if considered greater than the other, and 0 otherwise (either the same location, or not comparable (e.g. came from different partitions)).

    Accordingly, this ordering is inconsistent with equals and does not generally obey the contract of Comparable.compareTo

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. val offset: Long
  18. def productElementNames: Iterator[String]
    Definition Classes
    Product
  19. val sequenceNr: Long
  20. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  21. def tryCompareTo[B >: LocationInPartition](that: B)(implicit evidence: (B) => PartiallyOrdered[B]): Option[Int]

    Scala API

    Scala API

    Returns Some(-1) if this location is considered less than the other, Some(1) if considered greater than the other, Some(0) if considered the same location, and None if not comparable (e.g. come from different partitions).

    Definition Classes
    LocationInPartition → PartiallyOrdered
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated @Deprecated
    Deprecated

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped