docs: private void addToBuffer(String document) {
          if (timerMDC == null) {
              timerMDC = MDC.get("name");
          }
  
          int length = document.length();
          // If this is the first document in the buffer, record its age
          bufferYoungest = new Date().getTime();
          if (docBuffer.isEmpty()) {
              bufferOldest = new Date().getTime();
              log.debug("=== New buffer starting: {}", bufferOldest);
          }
          // Add to the buffer
          docBuffer.add(document);
          bufferSize += length;
          // Check if submission is required
          checkBuffer();
      }