code: @NonNull
      public ListenerToken addDocumentReplicationListener(
          Executor executor,
          @NonNull DocumentReplicationListener listener) {
          if (listener == null) { throw new IllegalArgumentException("listener cannot be null."); }
  
          synchronized (lock) {
              setProgressLevel(ReplicatorProgressLevel.PER_DOCUMENT);
              final DocumentReplicationListenerToken token = new DocumentReplicationListenerToken(executor, listener);
              docEndedListenerTokens.add(token);
              return token;
          }
      }
docs: Set the given DocumentReplicationListener to the this replicator.
  
  @param listener