code: public static void applyRowCountHeader(MultivaluedMap<String, Object> headerParams, Query query, FutureRowCount rowCount) {
          if (rowCount != null) {
              try {
                  headerParams.putSingle(REQ_TOTAL_COUNT_HEADER_NAME, rowCount.get());
              } catch (InterruptedException | ExecutionException e) {
                  headerParams.putSingle(REQ_TOTAL_COUNT_HEADER_NAME, query.findCount());
              }
          }
      }
docs: <p>applyRowCountHeader.</p>
  
  @param headerParams a {@link javax.ws.rs.core.MultivaluedMap} object.
  @param query        a {@link io.ebean.Query} object.
  @param rowCount     a {@link io.ebean.FutureRowCount} object.