Class Replicator.Update<A extends ReplicatedData>

java.lang.Object
org.apache.pekko.cluster.ddata.Replicator.Update<A>
All Implemented Interfaces:
Serializable, NoSerializationVerificationNeeded, Replicator.Command<A>, scala.Equals, scala.Product
Enclosing class:
Replicator

public static final class Replicator.Update<A extends ReplicatedData> extends Object implements Replicator.Command<A>, NoSerializationVerificationNeeded, scala.Product, Serializable
See Also:
  • Constructor Details

    • Update

      public Update(Key<A> key, Replicator.WriteConsistency writeConsistency, scala.Option<Object> request, scala.Function1<scala.Option<A>,A> modify)
    • Update

      public Update(Key<A> key, A initial, Replicator.WriteConsistency writeConsistency, Function<A,A> modify)
      Java API: Modify value of local 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.

    • Update

      public Update(Key<A> key, A initial, Replicator.WriteConsistency writeConsistency, Optional<Object> request, Function<A,A> modify)
      Java API: Modify value of local 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.

  • Method Details

    • key

      public Key<A> key()
      Specified by:
      key in interface Replicator.Command<A extends ReplicatedData>
    • writeConsistency

      public Replicator.WriteConsistency writeConsistency()
    • request

      public scala.Option<Object> request()
    • modify

      public scala.Function1<scala.Option<A>,A> modify()
    • copy

      public <A extends ReplicatedData> Replicator.Update<A> copy(Key<A> key, Replicator.WriteConsistency writeConsistency, scala.Option<Object> request, scala.Function1<scala.Option<A>,A> modify)
    • copy$default$1

      public <A extends ReplicatedData> Key<A> copy$default$1()
    • copy$default$2

      public <A extends ReplicatedData> Replicator.WriteConsistency copy$default$2()
    • copy$default$3

      public <A extends ReplicatedData> scala.Option<Object> copy$default$3()
    • productPrefix

      public String productPrefix()
      Specified by:
      productPrefix in interface scala.Product
    • productArity

      public int productArity()
      Specified by:
      productArity in interface scala.Product
    • productElement

      public Object productElement(int x$1)
      Specified by:
      productElement in interface scala.Product
    • productIterator

      public scala.collection.Iterator<Object> productIterator()
      Specified by:
      productIterator in interface scala.Product
    • canEqual

      public boolean canEqual(Object x$1)
      Specified by:
      canEqual in interface scala.Equals
    • productElementName

      public String productElementName(int x$1)
      Specified by:
      productElementName in interface scala.Product
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object x$1)
      Specified by:
      equals in interface scala.Equals
      Overrides:
      equals in class Object