Search Results for

    Show / Hide Table of Contents

    Class GSet<T>

    Implements a 'Add Set' CRDT, also called a 'G-Set'. You can't remove elements of a G-Set.

    It is described in the paper A comprehensive study of Convergent and Commutative Replicated Data Types.

    A G-Set doesn't accumulate any garbage apart from the elements themselves.

    This class is immutable, i.e. "modifying" methods return a new instance.

    Inheritance
    object
    FastMerge<GSet<T>>
    GSet<T>
    Implements
    IReplicatedDataSerialization
    IEquatable<GSet<T>>
    IEnumerable<T>
    IEnumerable
    IDeltaReplicatedData<GSet<T>, GSet<T>>
    IDeltaReplicatedData
    IReplicatedData<GSet<T>>
    IReplicatedDelta
    IReplicatedData
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Akka.DistributedData
    Assembly: Akka.DistributedData.dll
    Syntax
    [Serializable]
    public sealed class GSet<T> : FastMerge<GSet<T>>, IReplicatedDataSerialization, IEquatable<GSet<T>>, IEnumerable<T>, IEnumerable, IDeltaReplicatedData<GSet<T>, GSet<T>>, IDeltaReplicatedData, IReplicatedData<GSet<T>>, IReplicatedDelta, IReplicatedData
    Type Parameters
    Name Description
    T

    TBD

    Constructors

    | Edit this page View Source

    GSet()

    TBD

    Declaration
    public GSet()
    | Edit this page View Source

    GSet(IImmutableSet<T>)

    TBD

    Declaration
    public GSet(IImmutableSet<T> elements)
    Parameters
    Type Name Description
    IImmutableSet<T> elements

    TBD

    | Edit this page View Source

    GSet(IImmutableSet<T>, GSet<T>)

    TBD

    Declaration
    public GSet(IImmutableSet<T> elements, GSet<T> delta)
    Parameters
    Type Name Description
    IImmutableSet<T> elements

    TBD

    GSet<T> delta

    Fields

    | Edit this page View Source

    Empty

    TBD

    Declaration
    public static readonly GSet<T> Empty
    Field Value
    Type Description
    GSet<T>

    Properties

    | Edit this page View Source

    Count

    TBD

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

    Delta

    The accumulated delta of mutator operations since previous ResetDelta(). When the Akka.DistributedData.Replicator invokes the modify function of the Update message and the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for the Akka.DistributedData.Replicator with the Delta accessor. The modify function shall still return the full state in the same way as IReplicatedData<T> without support for deltas.

    Declaration
    public GSet<T> Delta { get; }
    Property Value
    Type Description
    GSet<T>
    | Edit this page View Source

    Elements

    TBD

    Declaration
    public IImmutableSet<T> Elements { get; }
    Property Value
    Type Description
    IImmutableSet<T>
    | Edit this page View Source

    IsEmpty

    TBD

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

    SetType

    Declaration
    public Type SetType { get; }
    Property Value
    Type Description
    Type

    Methods

    | Edit this page View Source

    Add(T)

    TBD

    Declaration
    public GSet<T> Add(T element)
    Parameters
    Type Name Description
    T element

    TBD

    Returns
    Type Description
    GSet<T>

    TBD

    | Edit this page View Source

    Contains(T)

    TBD

    Declaration
    public bool Contains(T element)
    Parameters
    Type Name Description
    T element

    TBD

    Returns
    Type Description
    bool

    TBD

    | Edit this page View Source

    Equals(GSet<T>)

    TBD

    Declaration
    public bool Equals(GSet<T> other)
    Parameters
    Type Name Description
    GSet<T> other

    TBD

    Returns
    Type Description
    bool

    TBD

    | 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

    GetEnumerator()

    Declaration
    public IEnumerator<T> GetEnumerator()
    Returns
    Type Description
    IEnumerator<T>
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    object.GetHashCode()
    | Edit this page View Source

    Merge(GSet<T>)

    TBD

    Declaration
    public override GSet<T> Merge(GSet<T> other)
    Parameters
    Type Name Description
    GSet<T> other

    TBD

    Returns
    Type Description
    GSet<T>

    TBD

    Overrides
    FastMerge<GSet<T>>.Merge(GSet<T>)
    | Edit this page View Source

    MergeDelta(GSet<T>)

    When delta is merged into the full state this method is used. When the type GSet<T> of the delta is of the same type as the full state GSet<T> this method can be implemented by delegating to Merge(T).

    Declaration
    public GSet<T> MergeDelta(GSet<T> delta)
    Parameters
    Type Name Description
    GSet<T> delta
    Returns
    Type Description
    GSet<T>
    | Edit this page View Source

    ResetDelta()

    Reset collection of deltas from mutator operations. When the Akka.DistributedData.Replicator invokes the modify function of the Update message the delta is always "reset" and when the user code is invoking one or more mutator operations the data is collecting the delta of the operations and makes it available for the Akka.DistributedData.Replicator with the Delta accessor. When the Akka.DistributedData.Replicator has grabbed the Delta it will invoke this method to get a clean data instance without the delta.

    Declaration
    public GSet<T> ResetDelta()
    Returns
    Type Description
    GSet<T>
    | Edit this page View Source

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    object.ToString()

    Implements

    IReplicatedDataSerialization
    IEquatable<T>
    IEnumerable<T>
    IEnumerable
    IDeltaReplicatedData<T, TDelta>
    IDeltaReplicatedData
    IReplicatedData<T>
    IReplicatedDelta
    IReplicatedData

    Extension Methods

    ObjectExtensions.IsDefaultForType<T>(T)
    ObjectExtensions.AsOption<T>(T)
    EnumerableExtensions.Grouped<T>(IEnumerable<T>, int)
    Extensions.Concat<T>(IEnumerable<T>?, T)
    Extensions.Drop<T>(IEnumerable<T>, int)
    Extensions.ForEach<T>(IEnumerable<T>, Action<T>)
    Extensions.Head<T>(IEnumerable<T>)
    Extensions.TakeRight<T>(IEnumerable<T>, int)
    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