Class LwwTime

  • All Implemented Interfaces:, scala.Equals, scala.Product

    public final class LwwTime
    extends java.lang.Object
    implements scala.Product,
    Utility class for comparing timestamp replica identifier when implementing last-writer wins.
    See Also:
    Serialized Form
    • Constructor Detail

      • LwwTime

        public LwwTime​(long timestamp,
                       ReplicaId originReplica)
    • Method Detail

      • apply

        public static LwwTime apply​(long timestamp,
                                    ReplicaId originReplica)
      • unapply

        public static scala.Option<scala.Tuple2<java.lang.Object,​ReplicaId>> unapply​(LwwTime x$0)
      • timestamp

        public long timestamp()
      • originReplica

        public ReplicaId originReplica()
      • increase

        public LwwTime increase​(long t,
                                ReplicaId replicaId)
        Create a new LwwTime that has a timestamp that is max of the given timestamp and previous timestamp + 1, i.e. monotonically increasing.
      • isAfter

        public boolean isAfter​(LwwTime 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.
      • copy$default$1

        public long copy$default$1()
      • copy$default$2

        public ReplicaId copy$default$2()
      • productPrefix

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

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

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

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

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

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

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

        public java.lang.String toString()
        toString in class java.lang.Object
      • equals

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