use of com.hazelcast.cp.internal.raft.impl.dto.VoteRequest in project hazelcast by hazelcast.
the class LeaderElectionTask method innerRun.
@Override
protected void innerRun() {
RaftState state = raftNode.state();
if (state.leader() != null) {
logger.warning("No new election round, we already have a LEADER: " + state.leader());
return;
}
VoteRequest request = state.toCandidate(disruptive);
logger.info("Leader election started for term: " + request.term() + ", last log index: " + request.lastLogIndex() + ", last log term: " + request.lastLogTerm());
raftNode.printMemberState();
for (RaftEndpoint endpoint : state.remoteMembers()) {
raftNode.send(request, endpoint);
}
scheduleLeaderElectionTimeout();
}
Aggregations