Click or drag to resize
Akka.NETVectorClock Class

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.

Inheritance Hierarchy
SystemObject
  Akka.ClusterVectorClock

Namespace:  Akka.Cluster
Assembly:  Akka.Cluster (in Akka.Cluster.dll) Version: 1.2.3.42 (1.2.3.42)
Syntax
public sealed class VectorClock

The VectorClock type exposes the following members.

Properties
  NameDescription
Public propertyVersions
The list of vector clock values for each node.
Top
Methods
  NameDescription
Public methodCompareTo

Compares the current vector clock with the supplied vector clock. 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.
Public methodStatic memberCreate
Creates a new VectorClock
Public methodStatic memberCreate(ImmutableSortedDictionaryVectorClockNode, Int64)
Creates a VectorClock from some initial seed values.
Public methodEquals (Overrides ObjectEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode (Overrides ObjectGetHashCode.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodIncrement
Increment the version for the node passed as argument. Returns a new VectorClock.
Public methodIsAfter
Returns true if
this
is after
that
else false.
Public methodIsBefore
Returns true if
this
is before
that
else false.
Public methodIsConcurrentWith
Returns true if
this
and
that
are concurrent else false.
Public methodIsSameAs
Returns true if this VectorClock has the same history as the 'that' VectorClock else false.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodMerge
Merges the vector clock with another VectorClock (e.g. merges its versioned history).
Public methodPrune
Removes the specified node from the current vector clock.
Public methodToString
Returns a string that represents the current object.
(Overrides ObjectToString.)
Top
Operators
  NameDescription
Public operatorStatic memberEquality
Compares two specified vector clocks for equality.
Public operatorStatic memberGreaterThan
Compares two specified vector clocks to see if the first one is greater than the other one.
Public operatorStatic memberInequality
Compares two specified vector clocks for inequality.
Public operatorStatic memberLessThan
Compares two specified vector clocks to see if the first one is less than the other one.
Top
Extension Methods
See Also