public final class VectorClock
extends java.lang.Object
implements scala.Product, scala.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
VectorClock.After$ |
static class |
VectorClock.Before$ |
static class |
VectorClock.Concurrent$ |
static class |
VectorClock.Node$ |
static interface |
VectorClock.Ordering |
static class |
VectorClock.Same$ |
static class |
VectorClock.Timestamp$ |
Constructor and Description |
---|
VectorClock(scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions) |
Modifier and Type | Method and Description |
---|---|
VectorClock.Ordering |
compareTo(VectorClock that)
Compare two vector clocks.
|
VectorClock |
merge(VectorClock that)
Merges this VectorClock with another VectorClock.
|
VectorClock |
prune(java.lang.String removedNode) |
java.lang.String |
toString() |
scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> |
versions() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
public VectorClock(scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions)
public scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions()
public VectorClock.Ordering compareTo(VectorClock that)
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.
that
- (undocumented)public VectorClock merge(VectorClock that)
that
- (undocumented)public VectorClock prune(java.lang.String removedNode)
public java.lang.String toString()
toString
in class java.lang.Object