Akka.Cluster.Tests.MultiNode.LeaderLeavingSpecConfig.Listener.OnReceive C# (CSharp) Method

OnReceive() protected method

protected OnReceive ( object message ) : void
message object
return void
            protected override void OnReceive(object message)
            {
                var state = message as ClusterEvent.CurrentClusterState;
                if (state != null)
                {
                    if (state.Members.Any(m => m.Address == _oldLeaderAddress && m.Status == MemberStatus.Exiting))
                        _latch.CountDown();
                }
                var memberExited = message as ClusterEvent.MemberExited;
                if(memberExited != null && memberExited.Member.Address == _oldLeaderAddress)
                    _latch.CountDown();
            }
        }
LeaderLeavingSpecConfig.Listener