Exemplo n.º 1
0
 protected void DisconnectFromNode(RachisConsensus <CountingStateMachine> node)
 {
     foreach (var follower in RachisConsensuses.Where(x => x.Url != node.Url))
     {
         Disconnect(follower.Url, node.Url);
     }
 }
Exemplo n.º 2
0
 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);
     }
 }
Exemplo n.º 3
0
 protected List <RachisConsensus <CountingStateMachine> > GetFollowers()
 {
     return(RachisConsensuses.Where(
                x => x.CurrentState != RachisState.Leader &&
                x.CurrentState != RachisState.LeaderElect).ToList());
 }