protected void DisconnectFromNode(RachisConsensus <CountingStateMachine> node) { foreach (var follower in RachisConsensuses.Where(x => x.Url != node.Url)) { Disconnect(follower.Url, node.Url); } }
protected void ReconnectBiDirectionalFromNode(RachisConsensus <CountingStateMachine> node) { foreach (var follower in RachisConsensuses.Where(x => x.Url != node.Url)) { Reconnect(follower.Url, node.Url); Reconnect(node.Url, follower.Url); } }
protected List <RachisConsensus <CountingStateMachine> > GetFollowers() { return(RachisConsensuses.Where( x => x.CurrentState != RachisState.Leader && x.CurrentState != RachisState.LeaderElect).ToList()); }