Search Results for

    Show / Hide Table of Contents

    Class Update

    Send this message to the local Akka.DistributedData.Replicator to update a data value for the given Key. The Akka.DistributedData.Replicator will reply with one of the IUpdateResponse messages.

    The current data value for the Key is passed as parameter to the Modify function. It is null if there is no value for the Key, and otherwise Request. The function is supposed to return the new value of the data, which will then be replicated according to the given IWriteConsistency.

    The Modify function is called by the <xref href="Akka.DistributedData.Replicator" data-throw-if-not-resolved="false"></xref> actor and must therefore be a pure function that only uses the data parameter and stable fields from enclosing scope. It must for example not access sender() reference of an enclosing actor.

    Inheritance
    object
    Update
    Implements
    INoSerializationVerificationNeeded
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Akka.DistributedData
    Assembly: Akka.DistributedData.dll
    Syntax
    [Serializable]
    public sealed class Update : INoSerializationVerificationNeeded

    Constructors

    | Edit this page View Source

    Update(IKey, IReplicatedData, IWriteConsistency, Func<IReplicatedData, IReplicatedData>, object)

    Modify value of local Akka.DistributedData.Replicator and replicate with given IWriteConsistency.

    The current value for the Key is passed to the Modify function. If there is no current data value for the Key the initial value will be passed to the Modify function.

    The optional request context is included in the reply messages. This is a convenient way to pass contextual information (e.g. original sender) without having to use ask or local correlation data structures.

    Declaration
    public Update(IKey key, IReplicatedData initial, IWriteConsistency consistency, Func<IReplicatedData, IReplicatedData> modify, object request = null)
    Parameters
    Type Name Description
    IKey key
    IReplicatedData initial
    IWriteConsistency consistency
    Func<IReplicatedData, IReplicatedData> modify
    object request
    | Edit this page View Source

    Update(IKey, IWriteConsistency, Func<IReplicatedData, IReplicatedData>, object)

    Declaration
    public Update(IKey key, IWriteConsistency consistency, Func<IReplicatedData, IReplicatedData> modify, object request = null)
    Parameters
    Type Name Description
    IKey key
    IWriteConsistency consistency
    Func<IReplicatedData, IReplicatedData> modify
    object request

    Properties

    | Edit this page View Source

    Consistency

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

    Key

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

    Modify

    Declaration
    public Func<IReplicatedData, IReplicatedData> Modify { get; }
    Property Value
    Type Description
    Func<IReplicatedData, IReplicatedData>
    | Edit this page View Source

    Request

    Declaration
    public object Request { get; }
    Property Value
    Type Description
    object

    Methods

    | Edit this page View Source

    ToString()

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

    Implements

    INoSerializationVerificationNeeded

    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