VectorClock
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-226
Based on code from the 'vlock' VectorClock library by Coda Hale.
Attributes
- Source
- VectorClock.scala
- Graph
-
- Supertypes
Members list
Value members
Concrete methods
Increment the version for the node passed as argument. Returns a new VectorClock.
Increment the version for the node passed as argument. Returns a new VectorClock.
Attributes
- Source
- VectorClock.scala
Returns true if this is before that else false.
Returns true if this and that are concurrent else false.
Returns true if this VectorClock has the same history as the 'that' VectorClock else false.
Returns true if this VectorClock has the same history as the 'that' VectorClock else false.
Attributes
- Source
- VectorClock.scala
Returns true if this is after that else false.
Compare two vector clocks. The outcome will be one of the following:
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.
Attributes
- Source
- VectorClock.scala
Merges this VectorClock with another VectorClock. E.g. merges its versioned history.
Merges this VectorClock with another VectorClock. E.g. merges its versioned history.
Attributes
- Source
- VectorClock.scala
Attributes
- Source
- VectorClock.scala
Returns a string representation of the object.
Returns a string representation of the object.
The default representation is platform dependent.
Attributes
- Returns
-
a string representation of the object.
- Definition Classes
-
Any
- Source
- VectorClock.scala