/// <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) });
 }
Exemplo n.º 2
0
 /// <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) });
 }
Exemplo n.º 3
0
 protected override void PreStart()
 {
     _cluster.Subscribe(Self, ClusterEvent.InitialStateAsEvents, new[]
     {
         typeof(ClusterEvent.IMemberEvent),
         typeof(ClusterEvent.IClusterDomainEvent)
     });
 }
Exemplo n.º 4
0
 /// <summary>
 /// Need to subscribe to cluster changes
 /// </summary>
 protected override void PreStart()
 {
     Cluster.Subscribe(Self, new[] { typeof(ClusterEvent.MemberUp) });
     Cluster.RegisterOnMemberUp(() =>
     {
         // create routers and other things that depend on me being UP in the cluster
     });
 }
Exemplo n.º 5
0
 protected override void PreStart()
 {
     Cluster.Subscribe(Self,
                       ClusterEvent.InitialStateAsEvents,
                       new[] {
         typeof(ClusterEvent.IMemberEvent),
         typeof(ClusterEvent.UnreachableMember)
     });
 }
Exemplo n.º 6
0
        protected override void PreStart()
        {
            var self = Self;

            _cluster.RegisterOnMemberUp(() => { self.Tell(new ReadinessStatus(true)); });

            _cluster.RegisterOnMemberRemoved(() => { self.Tell(new ReadinessStatus(false)); });

            _cluster.Subscribe(Self, ClusterEvent.SubscriptionInitialStateMode.InitialStateAsSnapshot,
                               typeof(ClusterEvent.IReachabilityEvent));
        }
Exemplo n.º 7
0
 public CoordinatedShutdownLeave()
 {
     Receive <LeaveReq>(req =>
     {
         // MemberRemoved is needed in case it was downed instead
         _cluster.Leave(_cluster.SelfAddress);
         _cluster.Subscribe(Self, typeof(ClusterEvent.MemberLeft), typeof(ClusterEvent.MemberRemoved), typeof(ClusterEvent.MemberDowned));
         var s = Sender;
         Become(() => WaitingLeaveCompleted(s));
     });
 }
Exemplo n.º 8
0
        protected override void PreStart()
        {
            base.PreStart();

            Console.Title = $"JobRequester:{Cluster.SelfAddress}";

            Cluster.Subscribe(Self, ClusterEvent.InitialStateAsEvents,
                              typeof(ClusterEvent.IMemberEvent),
                              typeof(ClusterEvent.UnreachableMember)
                              );

            _upMembers = new HashSet <UniqueAddress>();
            BecomeNoJobHandlerAvailableState();
        }
        protected override void PreStart()
        {
            Cluster.Subscribe(Self,
                              ClusterEvent.InitialStateAsEvents,
                              new[] {
                typeof(ClusterEvent.IMemberEvent),
                typeof(ClusterEvent.UnreachableMember)
            });


            _pingWorker = Context
                          .ActorOf(Akka.Actor.Props.Create(() => new PingActor())
                                   .WithRouter(new RoundRobinPool(10)));
        }
Exemplo n.º 10
0
 /// <summary>
 /// TBD
 /// </summary>
 protected override void PreStart()
 {
     _cluster.Subscribe(Self, new [] { typeof(ClusterEvent.IClusterDomainEvent) });
     base.PreStart();
 }
Exemplo n.º 11
0
 /// <summary>
 /// Need to subscribe to cluster changes
 /// </summary>
 protected override void PreStart()
 {
     base.PreStart();
     Cluster.Subscribe(Self, typeof(ClusterEvent.MemberUp));
 }
Exemplo n.º 12
0
 protected override void PreStart()
 {
     base.PreStart();
     _cluster.Subscribe(Self, typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.IReachabilityEvent));
 }
Exemplo n.º 13
0
 protected override void PreStart()
 {
     _cluster.Subscribe(Self, new [] { typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.ReachabilityEvent) });
     _cluster.LogInfo("Metrics collection has started successfully.");
 }
Exemplo n.º 14
0
 protected override void PreStart()
 {
     //subscribe to all cluster domain events
     _cluster.Subscribe(Self, new [] { typeof(ClusterEvent.IClusterDomainEvent) });
 }
Exemplo n.º 15
0
 /// <summary>
 /// Need to subscribe to cluster changes
 /// </summary>
 protected override void PreStart()
 {
     Cluster.Subscribe(Self, new[] { typeof(ClusterEvent.MemberUp) });
 }
Exemplo n.º 16
0
 protected override void PreStart()
 {
     _cluster.Subscribe(Self, AC.ClusterEvent.SubscriptionInitialStateMode.InitialStateAsEvents,
                        typeof(AC.ClusterEvent.IClusterDomainEvent));
     base.PreStart();
 }
Exemplo n.º 17
0
 public ClusterMonitor()
 {
     // register for notifications
     Cluster.Subscribe(Self, new[] { typeof(ClusterEvent.IMemberEvent) });
 }
 protected override void PreStart()
 {
     Cluster.Subscribe(Self, typeof(MemberUp));
 }
Exemplo n.º 19
0
 /// <summary>
 /// TBD
 /// </summary>
 protected override void PreStart()
 {
     base.PreStart();
     _cluster.Subscribe(Self, new [] { typeof(ClusterEvent.IMemberEvent) });
 }
Exemplo n.º 20
0
        /// <summary>
        /// Need to subscribe to cluster changes
        /// </summary>
        protected override void PreStart()
        {
            Cluster.Subscribe(Self, ClusterEvent.InitialStateAsEvents, new[] { typeof(ClusterEvent.IMemberEvent), typeof(ClusterEvent.UnreachableMember) });

            Context.ActorSelection("akka.tcp://[email protected]:2551/user/clusterListener").Tell(new HelloMessage("Hello"));
        }