| DslUpdateT Method (IKeyT, T, IWriteConsistency, Object, FuncT, T) |
Constructs a message that, when send to
Replicator,
will perform an update of a structure stored under provided
key.
Update operation is described by
modify function, that will take
a previous value as an input parameter. If no value was found under the
key,
an
initial value will be used instead.
An
consistency level may be provided to set up certain constraints
on retrieved
IUpdateResponse replied from replicator as a result.
Namespace:
Akka.DistributedData
Assembly:
Akka.DistributedData (in Akka.DistributedData.dll) Version: 1.2.3.129 (1.2.3.129)
Syntax public static Update Update<T>(
IKey<T> key,
T initial,
IWriteConsistency consistency,
Object request,
Func<T, T> modify
)
where T : IReplicatedData
static member Update :
key : IKey<'T> *
initial : 'T *
consistency : IWriteConsistency *
request : Object *
modify : Func<'T, 'T> -> Update when 'T : IReplicatedData
Parameters
- key
- Type: Akka.DistributedDataIKeyT
Key under which a value should be updated. - initial
- Type: T
Initial value used, when no value has been stored under the provided key so far. - consistency
- Type: Akka.DistributedDataIWriteConsistency
Consistency determining how/when response will be emitted. - request
- Type: SystemObject
An object added to both generated Update request and
IUpdateResponse. Can be used i.e. as correlation id.
- modify
- Type: SystemFuncT, T
An updating function.
Type Parameters
- T
- Replicated data type.
Return Value
Type:
UpdateTBD
See Also