Class DistributedData$

    • Field Detail

      • MODULE$

        public static final DistributedData$ MODULE$
        Static reference to the singleton instance of this Scala object.
    • Constructor Detail

      • DistributedData$

        public DistributedData$()
    • Method Detail

      • withReplicatorMessageAdapter

        public <A,​B extends ReplicatedDataBehavior<A> withReplicatorMessageAdapter​(scala.Function1<ReplicatorMessageAdapter<A,​B>,​Behavior<A>> factory)
        When interacting with the DistributedData.replicator from an actor the ReplicatorMessageAdapter provides convenient methods that adapts the response messages to the requesting actor's message protocol.

        One ReplicatorMessageAdapter instance can be used for a given ReplicatedData type, e.g. an OrSet[String]. Interaction with several Keys can be used via the same adapter but they must all be of the same ReplicatedData type. For interaction with several different ReplicatedData types, e.g. an OrSet[String] and a GCounter, an adapter can be created for each type.

        *Warning*: A ReplicatorMessageAdapter instance is not thread-safe and must only be used from a single actor It must not be accessed from threads other than the ordinary actor message processing thread, such as Future callbacks. It must not be shared between several actor instances.

        Parameters:
        factory - Factory of the Behavior for the actor that is using the ReplicatorMessageAdapter

        Returns:
        (undocumented)