Search Results for

    Show / Hide Table of Contents

    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
    object
    VersionVector
    MultiVersionVector
    SingleVersionVector
    Implements
    IReplicatedDataSerialization
    IRemovedNodePruning<VersionVector>
    IRemovedNodePruning
    IReplicatedData<VersionVector>
    IReplicatedData
    IEquatable<VersionVector>
    Inherited Members
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Akka.DistributedData
    Assembly: Akka.DistributedData.dll
    Syntax
    [Serializable]
    public abstract class VersionVector : IReplicatedDataSerialization, IRemovedNodePruning<VersionVector>, IRemovedNodePruning, IReplicatedData<VersionVector>, IReplicatedData, IEquatable<VersionVector>

    Fields

    | Edit this page View Source

    Counter

    Declaration
    protected static readonly AtomicCounterLong Counter
    Field Value
    Type Description
    AtomicCounterLong
    | Edit this page View Source

    Empty

    Declaration
    public static readonly VersionVector Empty
    Field Value
    Type Description
    VersionVector

    Properties

    | Edit this page View Source

    Count

    Declaration
    public abstract int Count { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsEmpty

    Declaration
    public abstract bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    ModifiedByNodes

    The nodes that have changed the state for this data and would need pruning when such node is no longer part of the cluster.

    Declaration
    public abstract ImmutableHashSet<UniqueAddress> ModifiedByNodes { get; }
    Property Value
    Type Description
    ImmutableHashSet<UniqueAddress>
    | Edit this page View Source

    VersionEnumerator

    Declaration
    public abstract IEnumerator<KeyValuePair<UniqueAddress, long>> VersionEnumerator { get; }
    Property Value
    Type Description
    IEnumerator<KeyValuePair<UniqueAddress, long>>

    Methods

    | Edit this page 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
    Type Name Description
    VersionVector other
    Returns
    Type Description
    VersionVector.Ordering
    | Edit this page View Source

    Contains(UniqueAddress)

    Declaration
    public abstract bool Contains(UniqueAddress node)
    Parameters
    Type Name Description
    UniqueAddress node
    Returns
    Type Description
    bool
    | Edit this page View Source

    Create(UniqueAddress, long)

    Declaration
    public static VersionVector Create(UniqueAddress node, long version)
    Parameters
    Type Name Description
    UniqueAddress node
    long version
    Returns
    Type Description
    VersionVector
    | Edit this page View Source

    Create(ImmutableDictionary<UniqueAddress, long>)

    Declaration
    public static VersionVector Create(ImmutableDictionary<UniqueAddress, long> versions)
    Parameters
    Type Name Description
    ImmutableDictionary<UniqueAddress, long> versions
    Returns
    Type Description
    VersionVector
    | Edit this page View Source

    Equals(VersionVector)

    Declaration
    public bool Equals(VersionVector other)
    Parameters
    Type Name Description
    VersionVector other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    object.Equals(object)
    | Edit this page 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
    Type Name Description
    UniqueAddress node
    Returns
    Type Description
    VersionVector
    | Edit this page View Source

    IsAfter(VersionVector)

    Declaration
    public bool IsAfter(VersionVector y)
    Parameters
    Type Name Description
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsBefore(VersionVector)

    Declaration
    public bool IsBefore(VersionVector y)
    Parameters
    Type Name Description
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page View Source

    IsConcurrent(VersionVector)

    Declaration
    public bool IsConcurrent(VersionVector y)
    Parameters
    Type Name Description
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page 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
    Type Name Description
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page View Source

    Merge(IReplicatedData)

    Declaration
    public IReplicatedData Merge(IReplicatedData other)
    Parameters
    Type Name Description
    IReplicatedData other
    Returns
    Type Description
    IReplicatedData
    | Edit this page View Source

    Merge(VersionVector)

    Merges this VersionVector with another VersionVector. E.g. merges its versioned history.

    Declaration
    public abstract VersionVector Merge(VersionVector other)
    Parameters
    Type Name Description
    VersionVector other
    Returns
    Type Description
    VersionVector
    | Edit this page View Source

    NeedPruningFrom(UniqueAddress)

    Does it have any state changes from a specific node, which has been removed from the cluster.

    Declaration
    public abstract bool NeedPruningFrom(UniqueAddress removedNode)
    Parameters
    Type Name Description
    UniqueAddress removedNode
    Returns
    Type Description
    bool
    | Edit this page View Source

    Prune(UniqueAddress, UniqueAddress)

    When the removedNode node has been removed from the cluster the state changes from that node will be pruned by collapsing the data entries to another node.

    Declaration
    public abstract VersionVector Prune(UniqueAddress removedNode, UniqueAddress collapseInto)
    Parameters
    Type Name Description
    UniqueAddress removedNode
    UniqueAddress collapseInto
    Returns
    Type Description
    VersionVector
    | Edit this page View Source

    PruningCleanup(UniqueAddress)

    Remove data entries from a node that has been removed from the cluster and already been pruned.

    Declaration
    public abstract VersionVector PruningCleanup(UniqueAddress removedNode)
    Parameters
    Type Name Description
    UniqueAddress removedNode
    Returns
    Type Description
    VersionVector
    | Edit this page View Source

    VersionAt(UniqueAddress)

    Declaration
    public abstract long VersionAt(UniqueAddress node)
    Parameters
    Type Name Description
    UniqueAddress node
    Returns
    Type Description
    long

    Operators

    | Edit this page View Source

    operator ==(VersionVector, VersionVector)

    Declaration
    public static bool operator ==(VersionVector x, VersionVector y)
    Parameters
    Type Name Description
    VersionVector x
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator >(VersionVector, VersionVector)

    Returns true if x is after y else false.

    Declaration
    public static bool operator >(VersionVector x, VersionVector y)
    Parameters
    Type Name Description
    VersionVector x
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator !=(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
    Type Name Description
    VersionVector x
    VersionVector y
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator <(VersionVector, VersionVector)

    Returns true if x is before y else false.

    Declaration
    public static bool operator <(VersionVector x, VersionVector y)
    Parameters
    Type Name Description
    VersionVector x
    VersionVector y
    Returns
    Type Description
    bool

    Implements

    IReplicatedDataSerialization
    IRemovedNodePruning<T>
    IRemovedNodePruning
    IReplicatedData<T>
    IReplicatedData
    IEquatable<T>

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    Extensions.AsInstanceOf<T>(object)
    In this article
    • githubEdit this page
    • View Source
    Back to top
    Contribute
    • Project Chat
    • Discussion Forum
    • Source Code
    Support
    • Akka.NET Support Plans
    • Akka.NET Observability Tools
    • Akka.NET Training & Consulting
    Maintained By
    • Petabridge - The Akka.NET Company
    • Learn Akka.NET