code: protected PollResponse handlePoll(PollRequest request) {
      // If the request term is not as great as the current context term then don't
      // vote for the candidate. We want to vote for candidates that are at least
      // as up to date as us.
      if (request.term() < context.getTerm()) {
        LOGGER.debug("{} - Rejected {}: candidate's term is less than the current term", context.getCluster().member().address(), request);
        return PollResponse.builder()
          .withStatus(Response.Status.OK)
          .withTerm(context.getTerm())
          .withAccepted(false)
          .build();
      } else if (isLogUpToDate(request.logIndex(), request.logTerm(), request)) {
        return PollResponse.builder()
          .withStatus(Response.Status.OK)
          .withTerm(context.getTerm())
          .withAccepted(true)
          .build();
      } else {
        return PollResponse.builder()
          .withStatus(Response.Status.OK)
          .withTerm(context.getTerm())
          .withAccepted(false)
          .build();
      }
    }
docs: Handles a poll request.