final case class VectorClock(versions: TreeMap[Node, Long] = TreeMap.empty[VectorClock.Node, Long]) extends Product with Serializable
Ordering
- Alphabetic
- By Inheritance
Inherited
- VectorClock
- Serializable
- Product
- Equals
- AnyRef
- Any
Implicitly
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
Visibility
- Public
- Protected
Instance Constructors
Value Members
- def :+(node: Node): VectorClock
Increment the version for the node passed as argument.
Increment the version for the node passed as argument. Returns a new VectorClock.
- def <(that: VectorClock): Boolean
Returns true if
this
is beforethat
else false. - def <>(that: VectorClock): Boolean
Returns true if
this
andthat
are concurrent else false. - def ==(that: VectorClock): Boolean
Returns true if this VectorClock has the same history as the 'that' VectorClock else false.
- def >(that: VectorClock): Boolean
Returns true if
this
is afterthat
else false. - def compareTo(that: VectorClock): Ordering
Compare two vector clocks.
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.
- def merge(that: VectorClock): VectorClock
Merges this VectorClock with another VectorClock.
Merges this VectorClock with another VectorClock. E.g. merges its versioned history.
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def prune(removedNode: Node): VectorClock
- def toString(): String
- Definition Classes
- VectorClock → AnyRef → Any
- val versions: TreeMap[Node, Long]
Representation of a Vector-based clock (counting clock), inspired by Lamport logical clocks.
Based on code from the 'vlock' VectorClock library by Coda Hale.