code: private void markProcessed(final M metadata) {
      synchronized (processedLock) {
        processed.add(metadata);
        onceProcessed.add(metadata);
        processedLock.notifyAll();
      }
    }
docs: Mark the given metadata as processed.
  
  @param metadata Metadata to mark as processed.