示例#1
0
 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);
     }
 }
示例#3
0
 protected List <RachisConsensus <CountingStateMachine> > GetFollowers()
 {
     return(RachisConsensuses.Where(
                x => x.CurrentState != RachisState.Leader &&
                x.CurrentState != RachisState.LeaderElect).ToList());
 }