/// <summary> /// Need to subscribe to cluster changes /// </summary> protected override void PreStart() { Cluster = Cluster.Get(Context.System); // subscribe to IMemberEvent and UnreachableMember events Cluster.Subscribe(Self, ClusterEvent.InitialStateAsEvents, new[] { typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.UnreachableMember) }); }
/// <summary> /// TBD /// </summary> /// <param name="autoDownUnreachableAfter">TBD</param> public AutoDown(TimeSpan autoDownUnreachableAfter) : base(autoDownUnreachableAfter) { _cluster = Cluster.Get(Context.System); }
/// <summary> /// TBD /// </summary> /// <param name="system">TBD</param> public AutoDowning(ActorSystem system) { _clusterSettings = Cluster.Get(system).Settings; }
public ClusterHeartbeatReceiver() { // Important - don't use Cluster.Get(Context.System) in constructor because that would // cause deadlock. See startup sequence in ClusterDaemon. _selfHeartbeatRsp = new Lazy <ClusterHeartbeatSender.HeartbeatRsp>(() => new ClusterHeartbeatSender.HeartbeatRsp(Cluster.Get(Context.System).SelfUniqueAddress)); Receive <ClusterHeartbeatSender.Heartbeat>(heartbeat => Sender.Tell(_selfHeartbeatRsp.Value)); }
/// <summary> /// This constructor is used when creating an instance from configured fully-qualified name /// </summary> public PerformanceCounterMetricsCollector(ActorSystem system) : this(Cluster.Get(system)) { }
public ClusterHeartbeatReceiver() { _selfHeartbeatRsp = new ClusterHeartbeatSender.HeartbeatRsp(Cluster.Get(Context.System).SelfUniqueAddress); Receive <ClusterHeartbeatSender.Heartbeat>(heartbeat => Sender.Tell(_selfHeartbeatRsp)); }