Beispiel #1
0
 public ReplicatorPruningSpec(ReplicatorPruningSpecConfig config) : base(config)
 {
     _cluster    = Cluster.Cluster.Get(Sys);
     _timeout    = Dilated(TimeSpan.FromSeconds(3));
     _replicator = Sys.ActorOf(Replicator.Props(ReplicatorSettings.Create(Sys)
                                                .WithGossipInterval(TimeSpan.FromSeconds(1))
                                                .WithPruning(pruningInterval: TimeSpan.FromSeconds(1), maxPruningDissemination: _maxPruningDissemination)),
                               "replicator");
 }
        protected ReplicatorPruningSpec(ReplicatorPruningSpecConfig config) : base(config,
                                                                                   typeof(ReplicatorPruningSpec))
        {
            _cluster    = Akka.Cluster.Cluster.Get(Sys);
            _timeout    = Dilated(TimeSpan.FromSeconds(3));
            _replicator = Sys.ActorOf(Replicator.Props(ReplicatorSettings.Create(Sys)
                                                       .WithGossipInterval(TimeSpan.FromSeconds(1))
                                                       .WithPruning(pruningInterval: TimeSpan.FromSeconds(1),
                                                                    maxPruningDissemination: _maxPruningDissemination)),
                                      "replicator");

            First  = config.First;
            Second = config.Second;
            Third  = config.Third;
        }