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.
Assembly: Akka.DistributedData.dll
Syntax
[Serializable]
public sealed class Update : INoSerializationVerificationNeeded
Constructors
|
Improve this Doc
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
|
Improve this Doc
View Source
Update(IKey, IWriteConsistency, Func<IReplicatedData, IReplicatedData>, Object)
Declaration
public Update(IKey key, IWriteConsistency consistency, Func<IReplicatedData, IReplicatedData> modify, object request = null)
Parameters
Properties
|
Improve this Doc
View Source
Consistency
Declaration
public IWriteConsistency Consistency { get; }
Property Value
|
Improve this Doc
View Source
Key
Declaration
Property Value
|
Improve this Doc
View Source
Modify
Declaration
public Func<IReplicatedData, IReplicatedData> Modify { get; }
Property Value
|
Improve this Doc
View Source
Request
Declaration
public object Request { get; }
Property Value
Methods
|
Improve this Doc
View Source
ToString()
Declaration
public override string ToString()
Returns
Overrides
Implements
Extension Methods