Class ReplicatorSettings


  • public final class ReplicatorSettings
    extends java.lang.Object
    param: roles Replicas are running on members tagged with these roles. The member must have all given roles. All members are used if empty. param: gossipInterval How often the Replicator should send out gossip information. param: notifySubscribersInterval How often the subscribers will be notified of changes, if any. param: maxDeltaElements Maximum number of entries to transfer in one gossip message when synchronizing the replicas. Next chunk will be transferred in next round of gossip. param: dispatcher Id of the dispatcher to use for Replicator actors. If not specified ("") the default dispatcher is used. param: pruningInterval How often the Replicator checks for pruning of data associated with removed cluster nodes. param: maxPruningDissemination How long time it takes (worst case) to spread the data to all other replica nodes. This is used when initiating and completing the pruning process of data associated with removed cluster nodes. The time measurement is stopped when any replica is unreachable, so it should be configured to worst case in a healthy cluster. param: durableStoreProps Props for the durable store actor, the Left alternative is a tuple of fully qualified actor class name and the config constructor parameter of that class, the Right alternative is the Props of the actor. param: durableKeys Keys that are durable. Prefix matching is supported by using * at the end of a key. All entries can be made durable by including "*" in the Set. param: preferOldest Update and Get operations are sent to oldest nodes first.
    • Constructor Summary

      Constructors 
      Constructor Description
      ReplicatorSettings​(scala.collection.immutable.Set<java.lang.String> roles, scala.concurrent.duration.FiniteDuration gossipInterval, scala.concurrent.duration.FiniteDuration notifySubscribersInterval, int maxDeltaElements, java.lang.String dispatcher, scala.concurrent.duration.FiniteDuration pruningInterval, scala.concurrent.duration.FiniteDuration maxPruningDissemination, scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps, scala.collection.immutable.Set<java.lang.String> durableKeys, scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive, scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive, boolean deltaCrdtEnabled, int maxDeltaSize)  
      ReplicatorSettings​(scala.collection.immutable.Set<java.lang.String> roles, scala.concurrent.duration.FiniteDuration gossipInterval, scala.concurrent.duration.FiniteDuration notifySubscribersInterval, int maxDeltaElements, java.lang.String dispatcher, scala.concurrent.duration.FiniteDuration pruningInterval, scala.concurrent.duration.FiniteDuration maxPruningDissemination, scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps, scala.collection.immutable.Set<java.lang.String> durableKeys, scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive, scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive, boolean deltaCrdtEnabled, int maxDeltaSize, boolean preferOldest)  
      ReplicatorSettings​(scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration gossipInterval, scala.concurrent.duration.FiniteDuration notifySubscribersInterval, int maxDeltaElements, java.lang.String dispatcher, scala.concurrent.duration.FiniteDuration pruningInterval, scala.concurrent.duration.FiniteDuration maxPruningDissemination)  
      ReplicatorSettings​(scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration gossipInterval, scala.concurrent.duration.FiniteDuration notifySubscribersInterval, int maxDeltaElements, java.lang.String dispatcher, scala.concurrent.duration.FiniteDuration pruningInterval, scala.concurrent.duration.FiniteDuration maxPruningDissemination, scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps, scala.collection.immutable.Set<java.lang.String> durableKeys)  
      ReplicatorSettings​(scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration gossipInterval, scala.concurrent.duration.FiniteDuration notifySubscribersInterval, int maxDeltaElements, java.lang.String dispatcher, scala.concurrent.duration.FiniteDuration pruningInterval, scala.concurrent.duration.FiniteDuration maxPruningDissemination, scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps, scala.collection.immutable.Set<java.lang.String> durableKeys, scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive, scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive, boolean deltaCrdtEnabled)  
      ReplicatorSettings​(scala.Option<java.lang.String> role, scala.concurrent.duration.FiniteDuration gossipInterval, scala.concurrent.duration.FiniteDuration notifySubscribersInterval, int maxDeltaElements, java.lang.String dispatcher, scala.concurrent.duration.FiniteDuration pruningInterval, scala.concurrent.duration.FiniteDuration maxPruningDissemination, scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps, scala.collection.immutable.Set<java.lang.String> durableKeys, scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive, scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive, boolean deltaCrdtEnabled, int maxDeltaSize)  
    • Constructor Detail

      • ReplicatorSettings

        public ReplicatorSettings​(scala.collection.immutable.Set<java.lang.String> roles,
                                  scala.concurrent.duration.FiniteDuration gossipInterval,
                                  scala.concurrent.duration.FiniteDuration notifySubscribersInterval,
                                  int maxDeltaElements,
                                  java.lang.String dispatcher,
                                  scala.concurrent.duration.FiniteDuration pruningInterval,
                                  scala.concurrent.duration.FiniteDuration maxPruningDissemination,
                                  scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps,
                                  scala.collection.immutable.Set<java.lang.String> durableKeys,
                                  scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive,
                                  scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive,
                                  boolean deltaCrdtEnabled,
                                  int maxDeltaSize,
                                  boolean preferOldest)
      • ReplicatorSettings

        public ReplicatorSettings​(scala.collection.immutable.Set<java.lang.String> roles,
                                  scala.concurrent.duration.FiniteDuration gossipInterval,
                                  scala.concurrent.duration.FiniteDuration notifySubscribersInterval,
                                  int maxDeltaElements,
                                  java.lang.String dispatcher,
                                  scala.concurrent.duration.FiniteDuration pruningInterval,
                                  scala.concurrent.duration.FiniteDuration maxPruningDissemination,
                                  scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps,
                                  scala.collection.immutable.Set<java.lang.String> durableKeys,
                                  scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive,
                                  scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive,
                                  boolean deltaCrdtEnabled,
                                  int maxDeltaSize)
      • ReplicatorSettings

        public ReplicatorSettings​(scala.Option<java.lang.String> role,
                                  scala.concurrent.duration.FiniteDuration gossipInterval,
                                  scala.concurrent.duration.FiniteDuration notifySubscribersInterval,
                                  int maxDeltaElements,
                                  java.lang.String dispatcher,
                                  scala.concurrent.duration.FiniteDuration pruningInterval,
                                  scala.concurrent.duration.FiniteDuration maxPruningDissemination,
                                  scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps,
                                  scala.collection.immutable.Set<java.lang.String> durableKeys,
                                  scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive,
                                  scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive,
                                  boolean deltaCrdtEnabled,
                                  int maxDeltaSize)
      • ReplicatorSettings

        public ReplicatorSettings​(scala.Option<java.lang.String> role,
                                  scala.concurrent.duration.FiniteDuration gossipInterval,
                                  scala.concurrent.duration.FiniteDuration notifySubscribersInterval,
                                  int maxDeltaElements,
                                  java.lang.String dispatcher,
                                  scala.concurrent.duration.FiniteDuration pruningInterval,
                                  scala.concurrent.duration.FiniteDuration maxPruningDissemination)
      • ReplicatorSettings

        public ReplicatorSettings​(scala.Option<java.lang.String> role,
                                  scala.concurrent.duration.FiniteDuration gossipInterval,
                                  scala.concurrent.duration.FiniteDuration notifySubscribersInterval,
                                  int maxDeltaElements,
                                  java.lang.String dispatcher,
                                  scala.concurrent.duration.FiniteDuration pruningInterval,
                                  scala.concurrent.duration.FiniteDuration maxPruningDissemination,
                                  scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps,
                                  scala.collection.immutable.Set<java.lang.String> durableKeys)
      • ReplicatorSettings

        public ReplicatorSettings​(scala.Option<java.lang.String> role,
                                  scala.concurrent.duration.FiniteDuration gossipInterval,
                                  scala.concurrent.duration.FiniteDuration notifySubscribersInterval,
                                  int maxDeltaElements,
                                  java.lang.String dispatcher,
                                  scala.concurrent.duration.FiniteDuration pruningInterval,
                                  scala.concurrent.duration.FiniteDuration maxPruningDissemination,
                                  scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps,
                                  scala.collection.immutable.Set<java.lang.String> durableKeys,
                                  scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive,
                                  scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive,
                                  boolean deltaCrdtEnabled)
    • Method Detail

      • apply

        public static ReplicatorSettings apply​(ActorSystem system)
        Create settings from the default configuration akka.cluster.distributed-data.
      • apply

        public static ReplicatorSettings apply​(com.typesafe.config.Config config)
        Create settings from a configuration with the same layout as the default configuration akka.cluster.distributed-data.
      • roleOption

        public static scala.Option<java.lang.String> roleOption​(java.lang.String role)
        INTERNAL API
      • name

        public static java.lang.String name​(ActorSystem system,
                                            scala.Option<java.lang.String> modifier)
        INTERNAL API The name of the actor used in DistributedData extensions.
      • roles

        public scala.collection.immutable.Set<java.lang.String> roles()
      • gossipInterval

        public scala.concurrent.duration.FiniteDuration gossipInterval()
      • notifySubscribersInterval

        public scala.concurrent.duration.FiniteDuration notifySubscribersInterval()
      • maxDeltaElements

        public int maxDeltaElements()
      • dispatcher

        public java.lang.String dispatcher()
      • pruningInterval

        public scala.concurrent.duration.FiniteDuration pruningInterval()
      • maxPruningDissemination

        public scala.concurrent.duration.FiniteDuration maxPruningDissemination()
      • durableStoreProps

        public scala.util.Either<scala.Tuple2<java.lang.String,​com.typesafe.config.Config>,​Props> durableStoreProps()
      • durableKeys

        public scala.collection.immutable.Set<java.lang.String> durableKeys()
      • pruningMarkerTimeToLive

        public scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive()
      • durablePruningMarkerTimeToLive

        public scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive()
      • deltaCrdtEnabled

        public boolean deltaCrdtEnabled()
      • maxDeltaSize

        public int maxDeltaSize()
      • preferOldest

        public boolean preferOldest()
      • withRoles

        public ReplicatorSettings withRoles​(scala.collection.immutable.Seq<java.lang.String> roles)
      • withRoles

        public ReplicatorSettings withRoles​(scala.collection.immutable.Set<java.lang.String> roles)
        INTERNAL API
      • role

        public scala.Option<java.lang.String> role()
      • withGossipInterval

        public ReplicatorSettings withGossipInterval​(scala.concurrent.duration.FiniteDuration gossipInterval)
      • withNotifySubscribersInterval

        public ReplicatorSettings withNotifySubscribersInterval​(scala.concurrent.duration.FiniteDuration notifySubscribersInterval)
      • withMaxDeltaElements

        public ReplicatorSettings withMaxDeltaElements​(int maxDeltaElements)
      • withDispatcher

        public ReplicatorSettings withDispatcher​(java.lang.String dispatcher)
      • withPruning

        public ReplicatorSettings withPruning​(scala.concurrent.duration.FiniteDuration pruningInterval,
                                              scala.concurrent.duration.FiniteDuration maxPruningDissemination)
      • withPruningMarkerTimeToLive

        public ReplicatorSettings withPruningMarkerTimeToLive​(scala.concurrent.duration.FiniteDuration pruningMarkerTimeToLive,
                                                              scala.concurrent.duration.FiniteDuration durablePruningMarkerTimeToLive)
      • withDurableKeys

        public ReplicatorSettings withDurableKeys​(scala.collection.immutable.Set<java.lang.String> durableKeys)
        Scala API
      • withDurableKeys

        public ReplicatorSettings withDurableKeys​(java.util.Set<java.lang.String> durableKeys)
        Java API
      • withDeltaCrdtEnabled

        public ReplicatorSettings withDeltaCrdtEnabled​(boolean deltaCrdtEnabled)