public void sendRequestVoteRequest(boolean isPrevote) throws GondolaException {
  if (!enabled || masterId >= 0) {
    return;
  }
  if (!isPrevote) {
    currentTerm++;
    votedFor=-1;
    save(currentTerm,memberId);
    votedFor=memberId;
  }
  prevotesOnly=isPrevote;
  Message message=pool.checkout();
  try {
    saveQueue.getLatest(savedRid);
    message.requestVoteRequest(memberId,currentTerm,isPrevote,savedRid);
    peers.forEach(null);
  }
  finally {
    message.release();
  }
  prevoteTs=clock.now() + (long)((Math.random() * prevotePeriod));
  if (!isPrevote) {
    prevoteTs+=electionTimeout;
  }
}

public void sendRequestVoteRequest ( boolean isPrevote ) throws GondolaException { if ( ! enabled || masterId >= 0 ) { return ; } if ( ! isPrevote ) { currentTerm ++ ; votedFor = - 1 ; save ( currentTerm , memberId ) ; votedFor = memberId ; } prevotesOnly = isPrevote ; Message message = pool . checkout ( ) ; try { saveQueue . getLatest ( savedRid ) ; message . requestVoteRequest ( memberId , currentTerm , isPrevote , savedRid ) ; peers . forEach ( null ) ; } finally { message . release ( ) ; } prevoteTs = clock . now ( ) + ( long ) ( ( Math . random ( ) * prevotePeriod ) ) ; if ( ! isPrevote ) { prevoteTs += electionTimeout ; } }
if not a prevote , increments the current term before sending out the message .
