code: public <T> void queue(StorageRequest<T> req, JsonBatchCallback<T> callback) throws IOException {
      checkState(
          !requestsExecutor.isShutdown() && !requestsExecutor.isTerminated(),
          "requestsExecutor should not be terminated to queue batch requests");
      if (maxRequestsPerBatch == 1) {
        responseFutures.add(
            requestsExecutor.submit(
                () -> {
                  execute(req, callback);
                  return null;
                }));
      } else {
        pendingRequests.add(batch -> req.queue(batch, callback));
  
        flushIfPossibleAndRequired();
      }
    }
docs: Adds an additional request to the batch, and possibly flushes the current contents of the batch
  if {@code maxRequestsPerBatch} has been reached.