public boolean isVoteGranted() {
        return numGranted() >= majoritySize();
    }
Check whether we have received enough votes to conclude the election and become leader.

@return true if at least a majority of nodes have granted the vote
raft/src/main/java/org/apache/kafka/raft/CandidateState.java