FindAndDeleteOperation<TDocument> findOneAndDelete(final Bson filter, final FindOneAndDeleteOptions options) { return new FindAndDeleteOperation<TDocument>(namespace, writeConcern, retryWrites, getCodec()) .filter(toBsonDocument(filter)) .projection(toBsonDocument(options.getProjection())) .sort(toBsonDocument(options.getSort())) .maxTime(options.getMaxTime(MILLISECONDS), MILLISECONDS) .collation(options.getCollation()); }
FindAndDeleteOperation<TDocument> findOneAndDelete(final Bson filter, final FindOneAndDeleteOptions options) { return new FindAndDeleteOperation<TDocument>(namespace, writeConcern, retryWrites, getCodec()) .filter(toBsonDocument(filter)) .projection(toBsonDocument(options.getProjection())) .sort(toBsonDocument(options.getSort())) .maxTime(options.getMaxTime(MILLISECONDS), MILLISECONDS) .collation(options.getCollation()); }