Class LwwTime
java.lang.Object
org.apache.pekko.persistence.typed.crdt.LwwTime
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
Utility class for comparing timestamp replica
identifier when implementing last-writer wins.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LwwTimebooleanlongbooleaninthashCode()Create a newLwwTimethat has atimestampthat ismaxof the given timestamp and previous timestamp + 1, i.e.booleanCompare thisLwwTimewith theother.intproductElement(int x$1) productElementName(int x$1) scala.collection.Iterator<Object>longtoString()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface scala.Product
productElementNames
-
Constructor Details
-
LwwTime
-
-
Method Details
-
apply
-
unapply
-
timestamp
public long timestamp() -
originReplica
-
increase
Create a newLwwTimethat has atimestampthat ismaxof the given timestamp and previous timestamp + 1, i.e. monotonically increasing. -
isAfter
Compare thisLwwTimewith theother. Greatest timestamp wins. If both timestamps are equal thedcidentifiers are compared and the one sorted first in alphanumeric order wins. -
copy
-
copy$default$1
public long copy$default$1() -
copy$default$2
-
productPrefix
- Specified by:
productPrefixin interfacescala.Product
-
productArity
public int productArity()- Specified by:
productArityin interfacescala.Product
-
productElement
- Specified by:
productElementin interfacescala.Product
-
productIterator
- Specified by:
productIteratorin interfacescala.Product
-
canEqual
- Specified by:
canEqualin interfacescala.Equals
-
productElementName
- Specified by:
productElementNamein interfacescala.Product
-
hashCode
public int hashCode() -
toString
-
equals
-