protected final FluentFuture<Integer> doUpdate(
            final Constraints.ConstraintHost criteria,
            final Constraints.Constraint update,
            final UpdateOptions options) {

      checkNotNull(criteria, "criteria");
      checkNotNull(update, "update");
      checkNotNull(options, "options");

      return submit(new Callable<UpdateResult>() {
        @Override
        public UpdateResult call() {
          return collection()
              .updateMany(
              convertToBson(criteria),
              convertToBson(update),
              options);
        }
      }).lazyTransform(new Function<UpdateResult, Integer>() {
        @Override
        public Integer apply(UpdateResult input) {
          return (int) input.getModifiedCount();
        }
      });
    }
Codec used for current collection type.
@return registry
mongo/src/org/immutables/mongo/repository/Repositories.java