Package net.kuujo.copycat.internal.util

Examples of net.kuujo.copycat.internal.util.Quorum.succeed()


                  .localNode(), node.member());
                quorum.fail();
              } else {
                LOGGER.info("{} - Received successful vote from {}", context.clusterManager()
                  .localNode(), node.member());
                quorum.succeed();
              }
            }
          });
        }
      });
View Full Code Here


    // Iterate through replicas and commit all entries up to the given index.
    for (NodeReplicator replica : replicaMap.values()) {
      replica.replicate(index).whenComplete((resultIndex, error) -> {
        // Once the commit succeeds, check the commit index of all replicas.
        if (error == null) {
          quorum.succeed();
          checkCommits();
        } else {
          quorum.fail();
        }
      });
View Full Code Here

    // Iterate through replicas and ping each replica. Internally, this
    // should cause the replica to send any remaining entries if necessary.
    for (NodeReplicator replica : replicaMap.values()) {
      replica.ping(index).whenComplete((resultIndex, error) -> {
        if (error == null) {
          quorum.succeed();
        } else {
          quorum.fail();
        }
      });
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.