code: public void clear() {
          documentsByEntity.clear();
          deletedEntities.clear();
          documentsById.clear();
          _knownMissingIds.clear();
          if (_countersByDocId != null) {
              _countersByDocId.clear();
          }
      }
docs: Clears this instance.
  Remove all entities from the delete queue and stops tracking changes for all entities.