protected final FluentFuture<Integer> doDelete(
        final Constraints.ConstraintHost criteria) {
      checkNotNull(criteria);
      return submit(new Callable<DeleteResult>() {
        @Override
        public DeleteResult call() {
          return collection().deleteMany(convertToBson(criteria));
        }
      }).lazyTransform(new Function<DeleteResult, Integer>() {
        @Override
        public Integer apply(DeleteResult input) {
          return (int) input.getDeletedCount();
        }
      });
    }
Codec used for current collection type.
@return registry
mongo/src/org/immutables/mongo/repository/Repositories.java