final case class LwwTime(timestamp: Long, originReplica: ReplicaId) extends Product with Serializable

Utility class for comparing timestamp replica identifier when implementing last-writer wins.

Source
LwwTime.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LwwTime
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new LwwTime(timestamp: Long, originReplica: ReplicaId)

Value Members

  1. def increase(t: Long, replicaId: ReplicaId): LwwTime

    Create a new LwwTime that has a timestamp that is max of the given timestamp and previous timestamp + 1, i.e.

    Create a new LwwTime that has a timestamp that is max of the given timestamp and previous timestamp + 1, i.e. monotonically increasing.

  2. def isAfter(other: LwwTime): Boolean

    Compare this LwwTime with the other.

    Compare this LwwTime with the other. Greatest timestamp wins. If both timestamps are equal the dc identifiers are compared and the one sorted first in alphanumeric order wins.

  3. val originReplica: ReplicaId
  4. def productElementNames: Iterator[String]
    Definition Classes
    Product
  5. val timestamp: Long