Example #1
0
        protected SplitBrainResolverBase(TimeSpan stableAfter, DowningStrategy strategy)
        {
            StableAfter = stableAfter;
            Strategy    = strategy;

            settings = new SplitBrainResolverSettings(Context.System.Settings.Config);

            // ReSharper disable once VirtualMemberCallInConstructor
            Timers.StartPeriodicTimer(Tick.Instance, Tick.Instance, TickInterval);

            ResetStableDeadline();
        }
Example #2
0
 public SplitBrainResolver(TimeSpan stableAfter, DowningStrategy strategy)
     : base(stableAfter, strategy)
 {
     cluster = Cluster.Get(Context.System);
     Log.Info(
         "SBR started. Config: strategy [{0}], stable-after [{1}], down-all-when-unstable [{2}], selfUniqueAddress [{3}].",
         Logging.SimpleName(strategy.GetType()),
         stableAfter,
         // ReSharper disable VirtualMemberCallInConstructor
         DownAllWhenUnstable == TimeSpan.Zero ? "off" : DownAllWhenUnstable.ToString(),
         SelfUniqueAddress.Address);
     // ReSharper restore VirtualMemberCallInConstructor
 }
Example #3
0
 public static Props Props2(TimeSpan stableAfter, DowningStrategy strategy)
 {
     return(Props.Create(() => new SplitBrainResolver(stableAfter, strategy)));
 }