Search Results for

    Show / Hide Table of Contents

    Interface IDeltaReplicatedData<T, TDelta>

    IReplicatedData<T> with additional support for delta-CRDT replication. delta-CRDT is a way to reduce the need for sending the full state for updates. For example adding element 'c' and 'd' to set {'a', 'b'} would result in sending the delta {'c', 'd'} and merge that with the state on the receiving side, resulting in set {'a', 'b', 'c', 'd'}.

    Learn more about this in the paper Delta State Replicated Data Types.

    Inherited Members
    IDeltaReplicatedData.MergeDelta(IReplicatedDelta)
    IReplicatedData<T>.Merge(T)
    IReplicatedData.Merge(IReplicatedData)
    Namespace: Akka.DistributedData
    Assembly: Akka.DistributedData.dll
    Syntax
    public interface IDeltaReplicatedData<T, TDelta> : IDeltaReplicatedData, IReplicatedData<T>, IReplicatedData where T : IReplicatedData where TDelta : IReplicatedDelta
    Type Parameters
    Name Description
    T

    Replicated data type

    TDelta

    The type of the delta. To be specified by subclass. It may be the same type as T or a different type if needed. For example GSet<T> uses the same type and ORSet<T> uses different types.

    Properties

    | 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
    TDelta Delta { get; }
    Property Value
    Type Description
    TDelta

    Methods

    | Edit this page View Source

    MergeDelta(TDelta)

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

    Declaration
    T MergeDelta(TDelta delta)
    Parameters
    Type Name Description
    TDelta delta
    Returns
    Type Description
    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
    T ResetDelta()
    Returns
    Type Description
    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