code: private int calculateBatchSize() {
          Integer batchSize = mongoIterable.getBatchSize();
          if (batchSize != null) {
              return batchSize;
          }
          long requested = getRequested();
          if (requested <= 1) {
              return 2;
          } else if (requested < Integer.MAX_VALUE) {
              return (int) requested;
          } else {
              return Integer.MAX_VALUE;
          }
      }
docs: Returns the batchSize to be used with the cursor.
  
  <p>If the batch size has been set on the MongoIterable that is used, otherwise the requested demand is used. When using requested
  demand, values less than 2 would close the cursor so that is the minimum batchSize and `Integer.MAX_VALUE` is the maximum.</p>
  
  @return the batchSize to use