Class VersionVector
Representation of a Vector-based clock (counting clock), inspired by Lamport logical clocks.
Based on code from VectorClock.
This class is immutable, i.e. "modifying" methods return a new instance.
Inheritance
VersionVector
Assembly: Akka.DistributedData.dll
Syntax
[Serializable]
public abstract class VersionVector : IReplicatedDataSerialization, IRemovedNodePruning<VersionVector>, IRemovedNodePruning, IReplicatedData<VersionVector>, IReplicatedData, IEquatable<VersionVector>
Fields
|
Improve this Doc
View Source
Counter
Declaration
protected static readonly AtomicCounterLong Counter
Field Value
|
Improve this Doc
View Source
Empty
Declaration
public static readonly VersionVector Empty
Field Value
Properties
|
Improve this Doc
View Source
Count
Declaration
public abstract int Count { get; }
Property Value
|
Improve this Doc
View Source
IsEmpty
Declaration
public abstract bool IsEmpty { get; }
Property Value
|
Improve this Doc
View Source
ModifiedByNodes
Declaration
public abstract ImmutableHashSet<UniqueAddress> ModifiedByNodes { get; }
Property Value
Type |
Description |
System.Collections.Immutable.ImmutableHashSet<UniqueAddress> |
|
|
Improve this Doc
View Source
VersionEnumerator
Declaration
public abstract IEnumerator<KeyValuePair<UniqueAddress, long>> VersionEnumerator { get; }
Property Value
Methods
|
Improve this Doc
View Source
Compare(VersionVector)
Compare two version vectors. The outcome will be one of the following:
Version 1 is SAME (==) as Version 2 iff for all i c1(i) == c2(i)
Version 1 is BEFORE (<) Version 2 iff for all i c1(i) <= c2(i) and there exist a j such that c1(j) < c2(j)
Version 1 is AFTER (>) Version 2 iff for all i c1(i) >= c2(i) and there exist a j such that c1(j) > c2(j)
Version 1 is CONCURRENT to Version 2 otherwise
Declaration
public VersionVector.Ordering Compare(VersionVector other)
Parameters
Returns
|
Improve this Doc
View Source
Contains(UniqueAddress)
Declaration
public abstract bool Contains(UniqueAddress node)
Parameters
Returns
|
Improve this Doc
View Source
Create(UniqueAddress, Int64)
Declaration
public static VersionVector Create(UniqueAddress node, long version)
Parameters
Returns
|
Improve this Doc
View Source
Create(ImmutableDictionary<UniqueAddress, Int64>)
Declaration
public static VersionVector Create(ImmutableDictionary<UniqueAddress, long> versions)
Parameters
Type |
Name |
Description |
System.Collections.Immutable.ImmutableDictionary<UniqueAddress, Int64> |
versions |
|
Returns
|
Improve this Doc
View Source
Equals(VersionVector)
Declaration
public bool Equals(VersionVector other)
Parameters
Returns
|
Improve this Doc
View Source
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
|
Improve this Doc
View Source
Increment(UniqueAddress)
Increment the version for the node passed as argument. Returns a new VersionVector.
Declaration
public abstract VersionVector Increment(UniqueAddress node)
Parameters
Returns
|
Improve this Doc
View Source
IsAfter(VersionVector)
Declaration
public bool IsAfter(VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
IsBefore(VersionVector)
Declaration
public bool IsBefore(VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
IsConcurrent(VersionVector)
Declaration
public bool IsConcurrent(VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
IsSame(VersionVector)
Returns true if this VersionVector has the same history
as the y
VersionVector else false.
Declaration
public bool IsSame(VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
Merge(IReplicatedData)
Declaration
public IReplicatedData Merge(IReplicatedData other)
Parameters
Returns
|
Improve this Doc
View Source
Merge(VersionVector)
Merges this VersionVector with another VersionVector. E.g. merges its versioned history.
Declaration
public abstract VersionVector Merge(VersionVector other)
Parameters
Returns
|
Improve this Doc
View Source
NeedPruningFrom(UniqueAddress)
Declaration
public abstract bool NeedPruningFrom(UniqueAddress removedNode)
Parameters
Returns
|
Improve this Doc
View Source
Prune(UniqueAddress, UniqueAddress)
Declaration
public abstract VersionVector Prune(UniqueAddress removedNode, UniqueAddress collapseInto)
Parameters
Returns
|
Improve this Doc
View Source
PruningCleanup(UniqueAddress)
Declaration
public abstract VersionVector PruningCleanup(UniqueAddress removedNode)
Parameters
Returns
|
Improve this Doc
View Source
VersionAt(UniqueAddress)
Declaration
public abstract long VersionAt(UniqueAddress node)
Parameters
Returns
Operators
|
Improve this Doc
View Source
Equality(VersionVector, VersionVector)
Declaration
public static bool operator ==(VersionVector x, VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
GreaterThan(VersionVector, VersionVector)
Returns true if x
is after y
else false.
Declaration
public static bool operator>(VersionVector x, VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
Inequality(VersionVector, VersionVector)
Returns true if x
VersionVector has other
history than the y
VersionVector else false.
Declaration
public static bool operator !=(VersionVector x, VersionVector y)
Parameters
Returns
|
Improve this Doc
View Source
LessThan(VersionVector, VersionVector)
Returns true if x
is before y
else false.
Declaration
public static bool operator <(VersionVector x, VersionVector y)
Parameters
Returns
Explicit Interface Implementations
|
Improve this Doc
View Source
IRemovedNodePruning.Prune(UniqueAddress, UniqueAddress)
Declaration
IReplicatedData IRemovedNodePruning.Prune(UniqueAddress removedNode, UniqueAddress collapseInto)
Parameters
Returns
|
Improve this Doc
View Source
IRemovedNodePruning.PruningCleanup(UniqueAddress)
Declaration
IReplicatedData IRemovedNodePruning.PruningCleanup(UniqueAddress removedNode)
Parameters
Returns
Implements
Extension Methods