@Override
        public Optional<T> call() throws Exception {
          @Nullable T result = collection().findOneAndDelete(convertToBson(criteria), options);
          return Optional.fromNullable(result);
        }
Codec used for current collection type.
@return registry
mongo/src/org/immutables/mongo/repository/Repositories.java