public static final class Replicator.Update<A extends ReplicatedData> extends java.lang.Object implements Replicator.Command<A>, NoSerializationVerificationNeeded, scala.Product, scala.Serializable
Constructor and Description |
---|
Update(Key<A> key,
A initial,
Replicator.WriteConsistency writeConsistency,
java.util.function.Function<A,A> modify)
Java API: Modify value of local
Replicator and replicate with given writeConsistency . |
Update(Key<A> key,
A initial,
Replicator.WriteConsistency writeConsistency,
java.util.Optional<java.lang.Object> request,
java.util.function.Function<A,A> modify)
Java API: Modify value of local
Replicator and replicate with given writeConsistency . |
Update(Key<A> key,
Replicator.WriteConsistency writeConsistency,
scala.Option<java.lang.Object> request,
scala.Function1<scala.Option<A>,A> modify) |
Modifier and Type | Method and Description |
---|---|
Key<A> |
key() |
scala.Function1<scala.Option<A>,A> |
modify() |
scala.Option<java.lang.Object> |
request() |
Replicator.WriteConsistency |
writeConsistency() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Update(Key<A> key, Replicator.WriteConsistency writeConsistency, scala.Option<java.lang.Object> request, scala.Function1<scala.Option<A>,A> modify)
public Update(Key<A> key, A initial, Replicator.WriteConsistency writeConsistency, java.util.function.Function<A,A> modify)
Replicator
and replicate with given writeConsistency
.
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.
key
- (undocumented)initial
- (undocumented)writeConsistency
- (undocumented)modify
- (undocumented)public Update(Key<A> key, A initial, Replicator.WriteConsistency writeConsistency, java.util.Optional<java.lang.Object> request, java.util.function.Function<A,A> modify)
Replicator
and replicate with given writeConsistency
.
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.
key
- (undocumented)initial
- (undocumented)writeConsistency
- (undocumented)request
- (undocumented)modify
- (undocumented)public Key<A> key()
key
in interface Replicator.Command<A extends ReplicatedData>
public Replicator.WriteConsistency writeConsistency()
public scala.Option<java.lang.Object> request()