use of org.apache.ratis.shaded.proto.RaftProtos.RequestVoteRequestProto in project incubator-ratis by apache.
the class LeaderElection method submitRequests.
private int submitRequests(final long electionTerm, final TermIndex lastEntry) {
int submitted = 0;
for (final RaftPeer peer : others) {
final RequestVoteRequestProto r = server.createRequestVoteRequest(peer.getId(), electionTerm, lastEntry);
service.submit(() -> server.getServerRpc().requestVote(r));
submitted++;
}
return submitted;
}
Aggregations