Package org.robotninjas.barge.log

Examples of org.robotninjas.barge.log.RaftLog.members()


    LOGGER.debug("Election starting for term {}", log.currentTerm());

    List<ListenableFuture<RequestVoteResponse>> responses = Lists.newArrayList();
    // Request votes from peers
    for (Replica replica : log.members()) {
      responses.add(sendVoteRequest(ctx, replica));
    }
    // We always vote for ourselves
    responses.add(Futures.immediateFuture(RequestVoteResponse.newBuilder().setVoteGranted(true).build()));
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.