akka.cluster
Class VectorClock

java.lang.Object
  extended by akka.cluster.VectorClock
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product

public class VectorClock
extends java.lang.Object
implements scala.Product, scala.Serializable

See Also:
Serialized Form

Nested Class Summary
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 Summary
VectorClock(scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions)
           
 
Method Summary
 VectorClock.Ordering compareTo(VectorClock that)
          Compare two vector clocks.
 VectorClock merge(VectorClock that)
          Merges this VectorClock with another VectorClock.
 java.lang.String toString()
           
 scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

VectorClock

public VectorClock(scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions)
Method Detail

versions

public scala.collection.immutable.TreeMap<java.lang.String,java.lang.Object> versions()

compareTo

public VectorClock.Ordering compareTo(VectorClock that)
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.
 

Parameters:
that - (undocumented)
Returns:
(undocumented)

merge

public VectorClock merge(VectorClock that)
Merges this VectorClock with another VectorClock. E.g. merges its versioned history.

Parameters:
that - (undocumented)
Returns:
(undocumented)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object