Package org.apache.pekko.cluster
Class VectorClock
java.lang.Object
org.apache.pekko.cluster.VectorClock
- All Implemented Interfaces:
Serializable,scala.Equals,scala.Product
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic interfacestatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription$colon$plus(String node) Increment the version for the node passed as argument.boolean$eq$eq(VectorClock that) Returns true if this VectorClock has the same history as the 'that' VectorClock else false.boolean$greater(VectorClock that) Returns true ifthisis afterthatelse false.boolean$less(VectorClock that) Returns true ifthisis beforethatelse false.boolean$less$greater(VectorClock that) Returns true ifthisandthatare concurrent else false.Representation of a Vector-based clock (counting clock), inspired by Lamport logical clocks.static VectorClockbooleancompareTo(VectorClock that) Compare two vector clocks.booleaninthashCode()merge(VectorClock that) Merges this VectorClock with another VectorClock.intproductElement(int x$1) productElementName(int x$1) scala.collection.Iterator<Object>toString()unapply(VectorClock x$0) versions()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface scala.Product
productElementNames
-
Constructor Details
-
VectorClock
-
-
Method Details
-
$lessinit$greater$default$1
Representation of a Vector-based clock (counting clock), inspired by Lamport logical clocks.Reference: 1) Leslie Lamport (1978). "Time, clocks, and the ordering of events in a distributed system". Communications of the ACM 21 (7): 558-565. 2) Friedemann Mattern (1988). "Virtual Time and Global States of Distributed Systems". Workshop on Parallel and Distributed Algorithms: pp. 215-226Based on code from the 'vlock' VectorClock library by Coda Hale.
-
apply
-
apply$default$1
-
unapply
public static scala.Option<scala.collection.immutable.TreeMap<String,Object>> unapply(VectorClock x$0) -
versions
-
$colon$plus
Increment the version for the node passed as argument. Returns a new VectorClock. -
$less$greater
Returns true ifthisandthatare concurrent else false. -
$less
Returns true ifthisis beforethatelse false. -
$greater
Returns true ifthisis afterthatelse false. -
$eq$eq
Returns true if this VectorClock has the same history as the 'that' VectorClock else false. -
compareTo
Compare two vector clocks. The outcome will be one of the following:1. Clock 1 is SAME (==) as Clock 2 iff for all i c1(i) == c2(i) 2. Clock 1 is BEFORE (<) Clock 2 iff for all i c1(i) <= c2(i) and there exist a j such that c1(j) < c2(j) 3. Clock 1 is AFTER (>) Clock 2 iff for all i c1(i) >= c2(i) and there exist a j such that c1(j) > c2(j). 4. Clock 1 is CONCURRENT (<>) to Clock 2 otherwise. -
merge
Merges this VectorClock with another VectorClock. E.g. merges its versioned history. -
prune
-
toString
-
copy
-
copy$default$1
-
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() -
equals
-