+ log.debug("{}: In requestVote: {} - currentTerm: {}, votedFor: {}, lastIndex: {}, lastTerm: {}", logName(),
+ requestVote, currentTerm(), votedFor(), lastIndex(), lastTerm());
+
+ boolean grantVote = canGrantVote(requestVote);
+
+ if (grantVote) {
+ context.getTermInformation().updateAndPersist(requestVote.getTerm(), requestVote.getCandidateId());
+ }
+
+ RequestVoteReply reply = new RequestVoteReply(currentTerm(), grantVote);
+
+ log.debug("{}: requestVote returning: {}", logName(), reply);
+
+ sender.tell(reply, actor());