code: public void send(ByteArrayOutputStream bos) {
      try {
        if (this.isDisabled) {
          return;
        }
        if (available.tryAcquire(WAIT_NEXT_BUFFER_TIME_OUT_SECONDS, TimeUnit.SECONDS)) {
          tasks.add(sendExecutor.submit(new SendWorker(bos, segmentId++, false)));
        } else {
          setErrorStatus("Number of chunks in the queue to be send exceeded the configured number " 
               + maxBufferedChunks, null);
        }
      } catch (Exception e) {
        setErrorStatus("Exception when submitting a task", e);
      }
    }
docs: Send a chunk of data.