Interface ReactiveMongoCollection<T>

  • Type Parameters:
    T - The type that this collection will encode documents from and decode documents to.
    All Known Implementing Classes:
    ReactiveMongoCollectionImpl

    public interface ReactiveMongoCollection<T>
    A reactive API to interact with a Mongo collection.
    Since:
    1.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      io.smallrye.mutiny.Multi<T> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline)
      Aggregates documents according to the specified aggregation pipeline.
      io.smallrye.mutiny.Multi<T> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, AggregateOptions options)
      Aggregates documents according to the specified aggregation pipeline.
      <D> io.smallrye.mutiny.Multi<D> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz)
      Aggregates documents according to the specified aggregation pipeline.
      <D> io.smallrye.mutiny.Multi<D> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz, AggregateOptions options)
      Aggregates documents according to the specified aggregation pipeline.
      io.smallrye.mutiny.Multi<T> aggregate​(List<? extends org.bson.conversions.Bson> pipeline)
      Aggregates documents according to the specified aggregation pipeline.
      io.smallrye.mutiny.Multi<T> aggregate​(List<? extends org.bson.conversions.Bson> pipeline, AggregateOptions options)
      Aggregates documents according to the specified aggregation pipeline.
      <D> io.smallrye.mutiny.Multi<D> aggregate​(List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz)
      Aggregates documents according to the specified aggregation pipeline.
      <D> io.smallrye.mutiny.Multi<D> aggregate​(List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz, AggregateOptions options)
      Aggregates documents according to the specified aggregation pipeline.
      io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests)
      Executes a mix of inserts, updates, replaces, and deletes.
      io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests, com.mongodb.client.model.BulkWriteOptions options)
      Executes a mix of inserts, updates, replaces, and deletes.
      io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests)
      Executes a mix of inserts, updates, replaces, and deletes.
      io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests, com.mongodb.client.model.BulkWriteOptions options)
      Executes a mix of inserts, updates, replaces, and deletes.
      io.smallrye.mutiny.Uni<Long> countDocuments()
      Counts the number of documents in the collection.
      io.smallrye.mutiny.Uni<Long> countDocuments​(com.mongodb.reactivestreams.client.ClientSession clientSession)
      Counts the number of documents in the collection according to the given options.
      io.smallrye.mutiny.Uni<Long> countDocuments​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      Counts the number of documents in the collection according to the given options.
      io.smallrye.mutiny.Uni<Long> countDocuments​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.CountOptions options)
      Counts the number of documents in the collection according to the given options.
      io.smallrye.mutiny.Uni<Long> countDocuments​(org.bson.conversions.Bson filter)
      Counts the number of documents in the collection according to the given options.
      io.smallrye.mutiny.Uni<Long> countDocuments​(org.bson.conversions.Bson filter, com.mongodb.client.model.CountOptions options)
      Counts the number of documents in the collection according to the given options.
      io.smallrye.mutiny.Uni<String> createIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson key)
      Creates an index.
      io.smallrye.mutiny.Uni<String> createIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson key, com.mongodb.client.model.IndexOptions options)
      Creates an index.
      io.smallrye.mutiny.Uni<String> createIndex​(org.bson.conversions.Bson key)
      Creates an index.
      io.smallrye.mutiny.Uni<String> createIndex​(org.bson.conversions.Bson key, com.mongodb.client.model.IndexOptions options)
      Creates an index.
      io.smallrye.mutiny.Uni<List<String>> createIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<com.mongodb.client.model.IndexModel> indexes)
      Create multiple indexes.
      io.smallrye.mutiny.Uni<List<String>> createIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<com.mongodb.client.model.IndexModel> indexes, com.mongodb.client.model.CreateIndexOptions createIndexOptions)
      Create multiple indexes.
      io.smallrye.mutiny.Uni<List<String>> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes)
      Create multiple indexes.
      io.smallrye.mutiny.Uni<List<String>> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes, com.mongodb.client.model.CreateIndexOptions createIndexOptions)
      Create multiple indexes.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      Removes all documents from the collection that match the given query filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      Removes all documents from the collection that match the given query filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(org.bson.conversions.Bson filter)
      Removes all documents from the collection that match the given query filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      Removes all documents from the collection that match the given query filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      Removes at most one document from the collection that matches the given filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      Removes at most one document from the collection that matches the given filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(org.bson.conversions.Bson filter)
      Removes at most one document from the collection that matches the given filter.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(org.bson.conversions.Bson filter, com.mongodb.client.model.DeleteOptions options)
      Removes at most one document from the collection that matches the given filter.
      <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession, String fieldName, Class<D> clazz)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession, String fieldName, Class<D> clazz, DistinctOptions options)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession, String fieldName, org.bson.conversions.Bson filter, Class<D> clazz)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession, String fieldName, org.bson.conversions.Bson filter, Class<D> clazz, DistinctOptions options)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName, Class<D> clazz)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName, Class<D> clazz, DistinctOptions options)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName, org.bson.conversions.Bson filter, Class<D> clazz)
      Gets the distinct values of the specified field name.
      <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName, org.bson.conversions.Bson filter, Class<D> clazz, DistinctOptions options)
      Gets the distinct values of the specified field name.
      io.smallrye.mutiny.Uni<Void> drop()
      Drops this collection from the database.
      io.smallrye.mutiny.Uni<Void> drop​(com.mongodb.reactivestreams.client.ClientSession clientSession)
      Drops this collection from the database.
      io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession, String indexName)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession, String indexName, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson keys)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson keys, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(String indexName)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(String indexName, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(org.bson.conversions.Bson keys)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndex​(org.bson.conversions.Bson keys, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      Drops the index given the keys used to create it.
      io.smallrye.mutiny.Uni<Void> dropIndexes()
      Drop all the indexes on this collection, except for the default on _id.
      io.smallrye.mutiny.Uni<Void> dropIndexes​(com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      Drop all the indexes on this collection, except for the default on _id.
      io.smallrye.mutiny.Uni<Void> dropIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession)
      Drop all the indexes on this collection, except for the default on _id.
      io.smallrye.mutiny.Uni<Void> dropIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession, com.mongodb.client.model.DropIndexOptions dropIndexOptions)
      Drop all the indexes on this collection, except for the default on _id.
      io.smallrye.mutiny.Uni<Long> estimatedDocumentCount()
      Gets an estimate of the count of documents in a collection using collection metadata.
      io.smallrye.mutiny.Uni<Long> estimatedDocumentCount​(com.mongodb.client.model.EstimatedDocumentCountOptions options)
      Gets an estimate of the count of documents in a collection using collection metadata.
      io.smallrye.mutiny.Multi<T> find()
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession)
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, FindOptions options)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, Class<D> clazz)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, Class<D> clazz, FindOptions options)
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, FindOptions options)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, Class<D> clazz)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, Class<D> clazz, FindOptions options)
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(FindOptions options)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(Class<D> clazz)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(Class<D> clazz, FindOptions options)
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(org.bson.conversions.Bson filter)
      Finds all documents in the collection.
      io.smallrye.mutiny.Multi<T> find​(org.bson.conversions.Bson filter, FindOptions options)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(org.bson.conversions.Bson filter, Class<D> clazz)
      Finds all documents in the collection.
      <D> io.smallrye.mutiny.Multi<D> find​(org.bson.conversions.Bson filter, Class<D> clazz, FindOptions options)
      Finds all documents in the collection.
      io.smallrye.mutiny.Uni<T> findOneAndDelete​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter)
      Atomically find a document and remove it.
      io.smallrye.mutiny.Uni<T> findOneAndDelete​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, com.mongodb.client.model.FindOneAndDeleteOptions options)
      Atomically find a document and remove it.
      io.smallrye.mutiny.Uni<T> findOneAndDelete​(org.bson.conversions.Bson filter)
      Atomically find a document and remove it.
      io.smallrye.mutiny.Uni<T> findOneAndDelete​(org.bson.conversions.Bson filter, com.mongodb.client.model.FindOneAndDeleteOptions options)
      Atomically find a document and remove it.
      io.smallrye.mutiny.Uni<T> findOneAndReplace​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, T replacement)
      Atomically find a document and replace it.
      io.smallrye.mutiny.Uni<T> findOneAndReplace​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, T replacement, com.mongodb.client.model.FindOneAndReplaceOptions options)
      Atomically find a document and replace it.
      io.smallrye.mutiny.Uni<T> findOneAndReplace​(org.bson.conversions.Bson filter, T replacement)
      Atomically find a document and replace it.
      io.smallrye.mutiny.Uni<T> findOneAndReplace​(org.bson.conversions.Bson filter, T replacement, com.mongodb.client.model.FindOneAndReplaceOptions options)
      Atomically find a document and replace it.
      io.smallrye.mutiny.Uni<T> findOneAndUpdate​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      Atomically find a document and update it.
      io.smallrye.mutiny.Uni<T> findOneAndUpdate​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.FindOneAndUpdateOptions options)
      Atomically find a document and update it.
      io.smallrye.mutiny.Uni<T> findOneAndUpdate​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      Atomically find a document and update it.
      io.smallrye.mutiny.Uni<T> findOneAndUpdate​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.FindOneAndUpdateOptions options)
      Atomically find a document and update it.
      org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
      Gets the codec registry of this collection.
      Class<T> getDocumentClass()
      Get the class of documents stored in this collection.
      com.mongodb.MongoNamespace getNamespace()
      Gets the namespace of this collection.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends T> documents)
      Inserts a batch of documents.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends T> documents, com.mongodb.client.model.InsertManyOptions options)
      Inserts a batch of documents.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(List<? extends T> documents)
      Inserts a batch of documents.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(List<? extends T> documents, com.mongodb.client.model.InsertManyOptions options)
      Inserts a batch of documents.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, T document)
      Inserts the provided document.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, T document, com.mongodb.client.model.InsertOneOptions options)
      Inserts the provided document.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(T document)
      Inserts the provided document.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(T document, com.mongodb.client.model.InsertOneOptions options)
      Inserts the provided document.
      io.smallrye.mutiny.Multi<org.bson.Document> listIndexes()
      Get all the indexes in this collection.
      io.smallrye.mutiny.Multi<org.bson.Document> listIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession)
      Get all the indexes in this collection.
      <D> io.smallrye.mutiny.Multi<D> listIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession, Class<D> clazz)
      Get all the indexes in this collection.
      <D> io.smallrye.mutiny.Multi<D> listIndexes​(Class<D> clazz)
      Get all the indexes in this collection.
      io.smallrye.mutiny.Multi<T> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession, String mapFunction, String reduceFunction)
      Aggregates documents according to the specified map-reduce function.
      io.smallrye.mutiny.Multi<T> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession, String mapFunction, String reduceFunction, MapReduceOptions options)
      Aggregates documents according to the specified map-reduce function.
      <D> io.smallrye.mutiny.Multi<D> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession, String mapFunction, String reduceFunction, Class<D> clazz)
      Aggregates documents according to the specified map-reduce function.
      <D> io.smallrye.mutiny.Multi<D> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession, String mapFunction, String reduceFunction, Class<D> clazz, MapReduceOptions options)
      Aggregates documents according to the specified map-reduce function.
      io.smallrye.mutiny.Multi<T> mapReduce​(String mapFunction, String reduceFunction)
      Aggregates documents according to the specified map-reduce function.
      io.smallrye.mutiny.Multi<T> mapReduce​(String mapFunction, String reduceFunction, MapReduceOptions options)
      Aggregates documents according to the specified map-reduce function.
      <D> io.smallrye.mutiny.Multi<D> mapReduce​(String mapFunction, String reduceFunction, Class<D> clazz)
      Aggregates documents according to the specified map-reduce function.
      <D> io.smallrye.mutiny.Multi<D> mapReduce​(String mapFunction, String reduceFunction, Class<D> clazz, MapReduceOptions options)
      Aggregates documents according to the specified map-reduce function.
      io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace)
      Rename the collection with oldCollectionName to the newCollectionName.
      io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace, com.mongodb.client.model.RenameCollectionOptions options)
      Rename the collection with oldCollectionName to the newCollectionName.
      io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.reactivestreams.client.ClientSession clientSession, com.mongodb.MongoNamespace newCollectionNamespace)
      Rename the collection with oldCollectionName to the newCollectionName.
      io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.reactivestreams.client.ClientSession clientSession, com.mongodb.MongoNamespace newCollectionNamespace, com.mongodb.client.model.RenameCollectionOptions options)
      Rename the collection with oldCollectionName to the newCollectionName.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, T replacement)
      Replace a document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, T replacement, com.mongodb.client.model.ReplaceOptions options)
      Replace a document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(org.bson.conversions.Bson filter, T replacement)
      Replace a document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(org.bson.conversions.Bson filter, T replacement, com.mongodb.client.model.ReplaceOptions options)
      Replace a document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      Update all documents in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions options)
      Update all documents in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      Update all documents in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions options)
      Update all documents in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      Update a single document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(com.mongodb.reactivestreams.client.ClientSession clientSession, org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions options)
      Update a single document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update)
      Update a single document in the collection according to the specified arguments.
      io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(org.bson.conversions.Bson filter, org.bson.conversions.Bson update, com.mongodb.client.model.UpdateOptions options)
      Update a single document in the collection according to the specified arguments.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch()
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession)
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, ChangeStreamOptions options)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, Class<D> clazz)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, Class<D> clazz, ChangeStreamOptions options)
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline)
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, ChangeStreamOptions options)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession, List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz, ChangeStreamOptions options)
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(ChangeStreamOptions options)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(Class<D> clazz)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(Class<D> clazz, ChangeStreamOptions options)
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(List<? extends org.bson.conversions.Bson> pipeline)
      Creates a change stream for this collection.
      io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(List<? extends org.bson.conversions.Bson> pipeline, ChangeStreamOptions options)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz)
      Creates a change stream for this collection.
      <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(List<? extends org.bson.conversions.Bson> pipeline, Class<D> clazz, ChangeStreamOptions options)
      Creates a change stream for this collection.
      <NewTDocument>
      ReactiveMongoCollection<NewTDocument>
      withDocumentClass​(Class<NewTDocument> clazz)
      Create a new ReactiveMongoCollection instance with a different default class to cast any documents returned from the database into..
      ReactiveMongoCollection<T> withReadPreference​(com.mongodb.ReadPreference readPreference)
      Create a new ReactiveMongoCollection instance with a different read preference.
    • Method Detail

      • getNamespace

        com.mongodb.MongoNamespace getNamespace()
        Gets the namespace of this collection.
        Returns:
        the namespace
      • getDocumentClass

        Class<T> getDocumentClass()
        Get the class of documents stored in this collection.
        Returns:
        the class
      • estimatedDocumentCount

        io.smallrye.mutiny.Uni<Long> estimatedDocumentCount()
        Gets an estimate of the count of documents in a collection using collection metadata.
        Returns:
        a Uni completed with the estimated number of documents
      • estimatedDocumentCount

        io.smallrye.mutiny.Uni<Long> estimatedDocumentCount​(com.mongodb.client.model.EstimatedDocumentCountOptions options)
        Gets an estimate of the count of documents in a collection using collection metadata.
        Parameters:
        options - the options describing the count
        Returns:
        a Uni completed with the estimated number of documents
      • countDocuments

        io.smallrye.mutiny.Uni<Long> countDocuments()
        Counts the number of documents in the collection.
        Returns:
        a Uni completed with the number of documents
      • countDocuments

        io.smallrye.mutiny.Uni<Long> countDocuments​(org.bson.conversions.Bson filter)
        Counts the number of documents in the collection according to the given options.
        Parameters:
        filter - the query filter
        Returns:
        a Uni completed with the number of documents
      • countDocuments

        io.smallrye.mutiny.Uni<Long> countDocuments​(org.bson.conversions.Bson filter,
                                                    com.mongodb.client.model.CountOptions options)
        Counts the number of documents in the collection according to the given options.
        Parameters:
        filter - the query filter
        options - the options describing the count
        Returns:
        a Uni completed with the number of documents
      • countDocuments

        io.smallrye.mutiny.Uni<Long> countDocuments​(com.mongodb.reactivestreams.client.ClientSession clientSession)
        Counts the number of documents in the collection according to the given options.
        Parameters:
        clientSession - the client session with which to associate this operation
        Returns:
        a Uni completed with the number of documents
      • countDocuments

        io.smallrye.mutiny.Uni<Long> countDocuments​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                    org.bson.conversions.Bson filter)
        Counts the number of documents in the collection according to the given options.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter
        Returns:
        a Uni completed with the number of documents
      • countDocuments

        io.smallrye.mutiny.Uni<Long> countDocuments​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                    org.bson.conversions.Bson filter,
                                                    com.mongodb.client.model.CountOptions options)
        Counts the number of documents in the collection according to the given options.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter
        options - the options describing the count
        Returns:
        a Uni completed with the number of documents
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName,
                                                 Class<D> clazz)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        fieldName - the field name*
        clazz - the default class to cast any distinct items into.
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName,
                                                 org.bson.conversions.Bson filter,
                                                 Class<D> clazz)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        fieldName - the field name
        filter - the query filter
        clazz - the default class to cast any distinct items into.
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                 String fieldName,
                                                 Class<D> clazz)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        fieldName - the field name
        clazz - the default class to cast any distinct items into.
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                 String fieldName,
                                                 org.bson.conversions.Bson filter,
                                                 Class<D> clazz)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        fieldName - the field name
        filter - the query filter
        clazz - the default class to cast any distinct items into.
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName,
                                                 Class<D> clazz,
                                                 DistinctOptions options)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        fieldName - the field name
        clazz - the default class to cast any distinct items into.
        options - the stream options
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(String fieldName,
                                                 org.bson.conversions.Bson filter,
                                                 Class<D> clazz,
                                                 DistinctOptions options)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        fieldName - the field name
        filter - the query filter
        clazz - the default class to cast any distinct items into.
        options - the stream options
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                 String fieldName,
                                                 Class<D> clazz,
                                                 DistinctOptions options)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        fieldName - the field name
        clazz - the default class to cast any distinct items into.
        options - the stream options
        Returns:
        a Multi emitting the sequence of distinct values
      • distinct

        <D> io.smallrye.mutiny.Multi<D> distinct​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                 String fieldName,
                                                 org.bson.conversions.Bson filter,
                                                 Class<D> clazz,
                                                 DistinctOptions options)
        Gets the distinct values of the specified field name.
        Type Parameters:
        D - the target type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        fieldName - the field name
        filter - the query filter
        clazz - the default class to cast any distinct items into.
        options - the stream options
        Returns:
        a Multi emitting the sequence of distinct values
      • find

        io.smallrye.mutiny.Multi<T> find()
        Finds all documents in the collection.
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(Class<D> clazz)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clazz - the class to decode each document into
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(org.bson.conversions.Bson filter)
        Finds all documents in the collection.
        Parameters:
        filter - the query filter
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(org.bson.conversions.Bson filter,
                                             Class<D> clazz)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        filter - the query filter
        clazz - the class to decode each document into
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession)
        Finds all documents in the collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                             Class<D> clazz)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        clazz - the class to decode each document into
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                         org.bson.conversions.Bson filter)
        Finds all documents in the collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                             org.bson.conversions.Bson filter,
                                             Class<D> clazz)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter
        clazz - the class to decode each document into
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(FindOptions options)
        Finds all documents in the collection.
        Parameters:
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(Class<D> clazz,
                                             FindOptions options)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(org.bson.conversions.Bson filter,
                                         FindOptions options)
        Finds all documents in the collection.
        Parameters:
        filter - the query filter
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(org.bson.conversions.Bson filter,
                                             Class<D> clazz,
                                             FindOptions options)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        filter - the query filter
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                         FindOptions options)
        Finds all documents in the collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                             Class<D> clazz,
                                             FindOptions options)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        io.smallrye.mutiny.Multi<T> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                         org.bson.conversions.Bson filter,
                                         FindOptions options)
        Finds all documents in the collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • find

        <D> io.smallrye.mutiny.Multi<D> find​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                             org.bson.conversions.Bson filter,
                                             Class<D> clazz,
                                             FindOptions options)
        Finds all documents in the collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream with the selected documents, can be empty if none matches.
      • aggregate

        io.smallrye.mutiny.Multi<T> aggregate​(List<? extends org.bson.conversions.Bson> pipeline)
        Aggregates documents according to the specified aggregation pipeline.
        Parameters:
        pipeline - the aggregate pipeline
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        <D> io.smallrye.mutiny.Multi<D> aggregate​(List<? extends org.bson.conversions.Bson> pipeline,
                                                  Class<D> clazz)
        Aggregates documents according to the specified aggregation pipeline.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        pipeline - the aggregate pipeline
        clazz - the class to decode each document into
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        io.smallrye.mutiny.Multi<T> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                              List<? extends org.bson.conversions.Bson> pipeline)
        Aggregates documents according to the specified aggregation pipeline.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregate pipeline
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        <D> io.smallrye.mutiny.Multi<D> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                  List<? extends org.bson.conversions.Bson> pipeline,
                                                  Class<D> clazz)
        Aggregates documents according to the specified aggregation pipeline.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregate pipeline
        clazz - the class to decode each document into
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        io.smallrye.mutiny.Multi<T> aggregate​(List<? extends org.bson.conversions.Bson> pipeline,
                                              AggregateOptions options)
        Aggregates documents according to the specified aggregation pipeline.
        Parameters:
        pipeline - the aggregate pipeline
        options - the stream options
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        <D> io.smallrye.mutiny.Multi<D> aggregate​(List<? extends org.bson.conversions.Bson> pipeline,
                                                  Class<D> clazz,
                                                  AggregateOptions options)
        Aggregates documents according to the specified aggregation pipeline.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        pipeline - the aggregate pipeline
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        io.smallrye.mutiny.Multi<T> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                              List<? extends org.bson.conversions.Bson> pipeline,
                                              AggregateOptions options)
        Aggregates documents according to the specified aggregation pipeline.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregate pipeline
        options - the stream options
        Returns:
        a stream containing the result of the aggregation operation
      • aggregate

        <D> io.smallrye.mutiny.Multi<D> aggregate​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                  List<? extends org.bson.conversions.Bson> pipeline,
                                                  Class<D> clazz,
                                                  AggregateOptions options)
        Aggregates documents according to the specified aggregation pipeline.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregate pipeline
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        a stream containing the result of the aggregation operation
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch()
        Creates a change stream for this collection.
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(Class<D> clazz)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clazz - the class to decode each document into
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(List<? extends org.bson.conversions.Bson> pipeline)
        Creates a change stream for this collection.
        Parameters:
        pipeline - the aggregation pipeline to apply to the change stream
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(List<? extends org.bson.conversions.Bson> pipeline,
                                                                                                          Class<D> clazz)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        pipeline - the aggregation pipeline to apply to the change stream
        clazz - the class to decode each document into
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession)
        Creates a change stream for this collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                          Class<D> clazz)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        clazz - the class to decode each document into
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                                      List<? extends org.bson.conversions.Bson> pipeline)
        Creates a change stream for this collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregation pipeline to apply to the change stream
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                          List<? extends org.bson.conversions.Bson> pipeline,
                                                                                                          Class<D> clazz)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregation pipeline to apply to the change stream
        clazz - the class to decode each document into
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(ChangeStreamOptions options)
        Creates a change stream for this collection.
        Parameters:
        options - the stream options
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(Class<D> clazz,
                                                                                                          ChangeStreamOptions options)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(List<? extends org.bson.conversions.Bson> pipeline,
                                                                                                                      ChangeStreamOptions options)
        Creates a change stream for this collection.
        Parameters:
        pipeline - the aggregation pipeline to apply to the change stream
        options - the stream options
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(List<? extends org.bson.conversions.Bson> pipeline,
                                                                                                          Class<D> clazz,
                                                                                                          ChangeStreamOptions options)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        pipeline - the aggregation pipeline to apply to the change stream
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                                      ChangeStreamOptions options)
        Creates a change stream for this collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        options - the stream options
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                          Class<D> clazz,
                                                                                                          ChangeStreamOptions options)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream of changes
      • watch

        io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<org.bson.Document>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                                      List<? extends org.bson.conversions.Bson> pipeline,
                                                                                                                      ChangeStreamOptions options)
        Creates a change stream for this collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregation pipeline to apply to the change stream
        options - the stream options
        Returns:
        the stream of changes
      • watch

        <D> io.smallrye.mutiny.Multi<com.mongodb.client.model.changestream.ChangeStreamDocument<D>> watch​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                                          List<? extends org.bson.conversions.Bson> pipeline,
                                                                                                          Class<D> clazz,
                                                                                                          ChangeStreamOptions options)
        Creates a change stream for this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        pipeline - the aggregation pipeline to apply to the change stream
        clazz - the class to decode each document into
        options - the stream options
        Returns:
        the stream of changes
      • mapReduce

        io.smallrye.mutiny.Multi<T> mapReduce​(String mapFunction,
                                              String reduceFunction)
        Aggregates documents according to the specified map-reduce function.
        Parameters:
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        <D> io.smallrye.mutiny.Multi<D> mapReduce​(String mapFunction,
                                                  String reduceFunction,
                                                  Class<D> clazz)
        Aggregates documents according to the specified map-reduce function.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        clazz - the class to decode each resulting document into.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        io.smallrye.mutiny.Multi<T> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                              String mapFunction,
                                              String reduceFunction)
        Aggregates documents according to the specified map-reduce function.
        Parameters:
        clientSession - the client session with which to associate this operation
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        <D> io.smallrye.mutiny.Multi<D> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                  String mapFunction,
                                                  String reduceFunction,
                                                  Class<D> clazz)
        Aggregates documents according to the specified map-reduce function.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        clazz - the class to decode each resulting document into.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        io.smallrye.mutiny.Multi<T> mapReduce​(String mapFunction,
                                              String reduceFunction,
                                              MapReduceOptions options)
        Aggregates documents according to the specified map-reduce function.
        Parameters:
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        options - The map reduce options configuring process and result.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        <D> io.smallrye.mutiny.Multi<D> mapReduce​(String mapFunction,
                                                  String reduceFunction,
                                                  Class<D> clazz,
                                                  MapReduceOptions options)
        Aggregates documents according to the specified map-reduce function.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        clazz - the class to decode each resulting document into.
        options - The map reduce options configuring process and result.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        io.smallrye.mutiny.Multi<T> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                              String mapFunction,
                                              String reduceFunction,
                                              MapReduceOptions options)
        Aggregates documents according to the specified map-reduce function.
        Parameters:
        clientSession - the client session with which to associate this operation
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        options - The map reduce options configuring process and result.
        Returns:
        a Multi containing the result of the map-reduce operation
      • mapReduce

        <D> io.smallrye.mutiny.Multi<D> mapReduce​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                  String mapFunction,
                                                  String reduceFunction,
                                                  Class<D> clazz,
                                                  MapReduceOptions options)
        Aggregates documents according to the specified map-reduce function.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        mapFunction - A JavaScript function that associates or "maps" a value with a key and emits the key and value pair.
        reduceFunction - A JavaScript function that "reduces" to a single object all the values associated with a particular key.
        clazz - the class to decode each resulting document into.
        options - The map reduce options configuring process and result.
        Returns:
        a Multi containing the result of the map-reduce operation
      • bulkWrite

        io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests)
        Executes a mix of inserts, updates, replaces, and deletes.
        Parameters:
        requests - the writes to execute
        Returns:
        a Uni receiving the BulkWriteResult
      • bulkWrite

        io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests,
                                                                           com.mongodb.client.model.BulkWriteOptions options)
        Executes a mix of inserts, updates, replaces, and deletes.
        Parameters:
        requests - the writes to execute
        options - the options to apply to the bulk write operation
        Returns:
        a Uni receiving the BulkWriteResult
      • bulkWrite

        io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                           List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests)
        Executes a mix of inserts, updates, replaces, and deletes.
        Parameters:
        clientSession - the client session with which to associate this operation
        requests - the writes to execute
        Returns:
        a Uni receiving the BulkWriteResult
      • bulkWrite

        io.smallrye.mutiny.Uni<com.mongodb.bulk.BulkWriteResult> bulkWrite​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                           List<? extends com.mongodb.client.model.WriteModel<? extends T>> requests,
                                                                           com.mongodb.client.model.BulkWriteOptions options)
        Executes a mix of inserts, updates, replaces, and deletes.
        Parameters:
        clientSession - the client session with which to associate this operation
        requests - the writes to execute
        options - the options to apply to the bulk write operation
        Returns:
        a Uni receiving the BulkWriteResult
      • insertOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(T document)
        Inserts the provided document. If the document is missing an identifier, the driver should generate one.
        Parameters:
        document - the document to insert
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(T document,
                                                                                    com.mongodb.client.model.InsertOneOptions options)
        Inserts the provided document. If the document is missing an identifier, the driver should generate one.
        Parameters:
        document - the document to insert
        options - the options to apply to the operation
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                    T document)
        Inserts the provided document. If the document is missing an identifier, the driver should generate one.
        Parameters:
        clientSession - the client session with which to associate this operation
        document - the document to insert
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertOneResult> insertOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                    T document,
                                                                                    com.mongodb.client.model.InsertOneOptions options)
        Inserts the provided document. If the document is missing an identifier, the driver should generate one.
        Parameters:
        clientSession - the client session with which to associate this operation
        document - the document to insert
        options - the options to apply to the operation
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(List<? extends T> documents)
        Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API.
        Parameters:
        documents - the documents to insert
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(List<? extends T> documents,
                                                                                      com.mongodb.client.model.InsertManyOptions options)
        Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API.
        Parameters:
        documents - the documents to insert
        options - the options to apply to the operation
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                      List<? extends T> documents)
        Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API.
        Parameters:
        clientSession - the client session with which to associate this operation
        documents - the documents to insert
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • insertMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.InsertManyResult> insertMany​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                      List<? extends T> documents,
                                                                                      com.mongodb.client.model.InsertManyOptions options)
        Inserts a batch of documents. The preferred way to perform bulk inserts is to use the BulkWrite API.
        Parameters:
        clientSession - the client session with which to associate this operation
        documents - the documents to insert
        options - the options to apply to the operation
        Returns:
        a Uni completed successfully when the operation completes, or propagating a DuplicateKeyException or MongoException on failure.
      • deleteOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(org.bson.conversions.Bson filter)
        Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
        Parameters:
        filter - the query filter to apply the the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(org.bson.conversions.Bson filter,
                                                                                 com.mongodb.client.model.DeleteOptions options)
        Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
        Parameters:
        filter - the query filter to apply the the delete operation
        options - the options to apply to the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                 org.bson.conversions.Bson filter)
        Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                 org.bson.conversions.Bson filter,
                                                                                 com.mongodb.client.model.DeleteOptions options)
        Removes at most one document from the collection that matches the given filter. If no documents match, the collection is not modified.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the delete operation
        options - the options to apply to the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(org.bson.conversions.Bson filter)
        Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
        Parameters:
        filter - the query filter to apply the the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(org.bson.conversions.Bson filter,
                                                                                  com.mongodb.client.model.DeleteOptions options)
        Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
        Parameters:
        filter - the query filter to apply the the delete operation
        options - the options to apply to the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                  org.bson.conversions.Bson filter)
        Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • deleteMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.DeleteResult> deleteMany​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                  org.bson.conversions.Bson filter,
                                                                                  com.mongodb.client.model.DeleteOptions options)
        Removes all documents from the collection that match the given query filter. If no documents match, the collection is not modified.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the delete operation
        options - the options to apply to the delete operation
        Returns:
        a Uni receiving the DeleteResult, or propagating a MongoException on failure.
      • replaceOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(org.bson.conversions.Bson filter,
                                                                                  T replacement)
        Replace a document in the collection according to the specified arguments.
        Parameters:
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        Returns:
        a Uni receiving the UpdateResult
      • replaceOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(org.bson.conversions.Bson filter,
                                                                                  T replacement,
                                                                                  com.mongodb.client.model.ReplaceOptions options)
        Replace a document in the collection according to the specified arguments.
        Parameters:
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        options - the options to apply to the replace operation
        Returns:
        a Uni receiving the UpdateResult
      • replaceOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                  org.bson.conversions.Bson filter,
                                                                                  T replacement)
        Replace a document in the collection according to the specified arguments.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        Returns:
        a Uni receiving the UpdateResult
      • replaceOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> replaceOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                  org.bson.conversions.Bson filter,
                                                                                  T replacement,
                                                                                  com.mongodb.client.model.ReplaceOptions options)
        Replace a document in the collection according to the specified arguments.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        options - the options to apply to the replace operation
        Returns:
        a Uni receiving the UpdateResult
      • updateOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(org.bson.conversions.Bson filter,
                                                                                 org.bson.conversions.Bson update)
        Update a single document in the collection according to the specified arguments.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        Returns:
        a Uni receiving the UpdateResult
      • updateOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(org.bson.conversions.Bson filter,
                                                                                 org.bson.conversions.Bson update,
                                                                                 com.mongodb.client.model.UpdateOptions options)
        Update a single document in the collection according to the specified arguments.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply to the update operation
        Returns:
        a Uni receiving the UpdateResult
      • updateOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                 org.bson.conversions.Bson filter,
                                                                                 org.bson.conversions.Bson update)
        Update a single document in the collection according to the specified arguments.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        Returns:
        a Uni receiving the UpdateResult
      • updateOne

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateOne​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                 org.bson.conversions.Bson filter,
                                                                                 org.bson.conversions.Bson update,
                                                                                 com.mongodb.client.model.UpdateOptions options)
        Update a single document in the collection according to the specified arguments.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply to the update operation
        Returns:
        a Uni receiving the UpdateResult
      • updateMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(org.bson.conversions.Bson filter,
                                                                                  org.bson.conversions.Bson update)
        Update all documents in the collection according to the specified arguments.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        Returns:
        a Uni receiving the UpdateResult
      • updateMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(org.bson.conversions.Bson filter,
                                                                                  org.bson.conversions.Bson update,
                                                                                  com.mongodb.client.model.UpdateOptions options)
        Update all documents in the collection according to the specified arguments.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply to the update operation
        Returns:
        a Uni receiving the UpdateResult
      • updateMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                  org.bson.conversions.Bson filter,
                                                                                  org.bson.conversions.Bson update)
        Update all documents in the collection according to the specified arguments.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        Returns:
        a Uni receiving the UpdateResult
      • updateMany

        io.smallrye.mutiny.Uni<com.mongodb.client.result.UpdateResult> updateMany​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                                                  org.bson.conversions.Bson filter,
                                                                                  org.bson.conversions.Bson update,
                                                                                  com.mongodb.client.model.UpdateOptions options)
        Update all documents in the collection according to the specified arguments.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply to the update operation
        Returns:
        a Uni receiving the UpdateResult
      • findOneAndDelete

        io.smallrye.mutiny.Uni<T> findOneAndDelete​(org.bson.conversions.Bson filter)
        Atomically find a document and remove it.
        Parameters:
        filter - the query filter to find the document with
        Returns:
        a Uni completed with the document that was removed. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndDelete

        io.smallrye.mutiny.Uni<T> findOneAndDelete​(org.bson.conversions.Bson filter,
                                                   com.mongodb.client.model.FindOneAndDeleteOptions options)
        Atomically find a document and remove it.
        Parameters:
        filter - the query filter to find the document with
        options - the options to apply to the operation
        Returns:
        a Uni completed with the document that was removed. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndDelete

        io.smallrye.mutiny.Uni<T> findOneAndDelete​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                   org.bson.conversions.Bson filter)
        Atomically find a document and remove it.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to find the document with
        Returns:
        a Uni completed with the document that was removed. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndDelete

        io.smallrye.mutiny.Uni<T> findOneAndDelete​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                   org.bson.conversions.Bson filter,
                                                   com.mongodb.client.model.FindOneAndDeleteOptions options)
        Atomically find a document and remove it.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to find the document with
        options - the options to apply to the operation
        Returns:
        a Uni completed with the document that was removed. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndReplace

        io.smallrye.mutiny.Uni<T> findOneAndReplace​(org.bson.conversions.Bson filter,
                                                    T replacement)
        Atomically find a document and replace it.
        Parameters:
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        Returns:
        a Uni completed with the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndReplace

        io.smallrye.mutiny.Uni<T> findOneAndReplace​(org.bson.conversions.Bson filter,
                                                    T replacement,
                                                    com.mongodb.client.model.FindOneAndReplaceOptions options)
        Atomically find a document and replace it.
        Parameters:
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        options - the options to apply to the operation
        Returns:
        a Uni completed with the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndReplace

        io.smallrye.mutiny.Uni<T> findOneAndReplace​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                    org.bson.conversions.Bson filter,
                                                    T replacement)
        Atomically find a document and replace it.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        Returns:
        a Uni completed with the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndReplace

        io.smallrye.mutiny.Uni<T> findOneAndReplace​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                    org.bson.conversions.Bson filter,
                                                    T replacement,
                                                    com.mongodb.client.model.FindOneAndReplaceOptions options)
        Atomically find a document and replace it.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - the query filter to apply the the replace operation
        replacement - the replacement document
        options - the options to apply to the operation
        Returns:
        a Uni completed with the document that was replaced. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndUpdate

        io.smallrye.mutiny.Uni<T> findOneAndUpdate​(org.bson.conversions.Bson filter,
                                                   org.bson.conversions.Bson update)
        Atomically find a document and update it.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        Returns:
        a Uni completed with the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndUpdate

        io.smallrye.mutiny.Uni<T> findOneAndUpdate​(org.bson.conversions.Bson filter,
                                                   org.bson.conversions.Bson update,
                                                   com.mongodb.client.model.FindOneAndUpdateOptions options)
        Atomically find a document and update it.
        Parameters:
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply to the operation
        Returns:
        a Uni completed with the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndUpdate

        io.smallrye.mutiny.Uni<T> findOneAndUpdate​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                   org.bson.conversions.Bson filter,
                                                   org.bson.conversions.Bson update)
        Atomically find a document and update it.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        Returns:
        a Uni completed with the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • findOneAndUpdate

        io.smallrye.mutiny.Uni<T> findOneAndUpdate​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                   org.bson.conversions.Bson filter,
                                                   org.bson.conversions.Bson update,
                                                   com.mongodb.client.model.FindOneAndUpdateOptions options)
        Atomically find a document and update it.
        Parameters:
        clientSession - the client session with which to associate this operation
        filter - a document describing the query filter, which may not be null.
        update - a document describing the update, which may not be null. The update to apply must include only update operators.
        options - the options to apply to the operation
        Returns:
        a Uni completed with the document that was updated. Depending on the value of the returnOriginal property, this will either be the document as it was before the update or as it is after the update. If no documents matched the query filter, then the uni is completed with null.
      • drop

        io.smallrye.mutiny.Uni<Void> drop()
        Drops this collection from the database.
        Returns:
        a Uni completed when the operation is done.
      • drop

        io.smallrye.mutiny.Uni<Void> drop​(com.mongodb.reactivestreams.client.ClientSession clientSession)
        Drops this collection from the database.
        Parameters:
        clientSession - the client session with which to associate this operation
        Returns:
        a Uni completed when the operation is done.
      • createIndex

        io.smallrye.mutiny.Uni<String> createIndex​(org.bson.conversions.Bson key)
        Creates an index.
        Parameters:
        key - an object describing the index key(s), which may not be null.
        Returns:
        a Uni receiving the created index name.
      • createIndex

        io.smallrye.mutiny.Uni<String> createIndex​(org.bson.conversions.Bson key,
                                                   com.mongodb.client.model.IndexOptions options)
        Creates an index.
        Parameters:
        key - an object describing the index key(s), which may not be null.
        options - the options for the index
        Returns:
        a Uni receiving the created index name.
      • createIndex

        io.smallrye.mutiny.Uni<String> createIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                   org.bson.conversions.Bson key)
        Creates an index.
        Parameters:
        clientSession - the client session with which to associate this operation
        key - an object describing the index key(s), which may not be null.
        Returns:
        a Uni receiving the created index name.
      • createIndex

        io.smallrye.mutiny.Uni<String> createIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                   org.bson.conversions.Bson key,
                                                   com.mongodb.client.model.IndexOptions options)
        Creates an index.
        Parameters:
        clientSession - the client session with which to associate this operation
        key - an object describing the index key(s), which may not be null.
        options - the options for the index
        Returns:
        a Uni receiving the created index name.
      • createIndexes

        io.smallrye.mutiny.Uni<List<String>> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes)
        Create multiple indexes.
        Parameters:
        indexes - the list of indexes
        Returns:
        a Uni completed with the result when the operation is done. The redeemed list contains the created index names.
      • createIndexes

        io.smallrye.mutiny.Uni<List<String>> createIndexes​(List<com.mongodb.client.model.IndexModel> indexes,
                                                           com.mongodb.client.model.CreateIndexOptions createIndexOptions)
        Create multiple indexes.
        Parameters:
        indexes - the list of indexes
        createIndexOptions - options to use when creating indexes
        Returns:
        a Uni completed with the result when the operation is done. The redeemed list contains the created index names.
      • createIndexes

        io.smallrye.mutiny.Uni<List<String>> createIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                           List<com.mongodb.client.model.IndexModel> indexes)
        Create multiple indexes.
        Parameters:
        clientSession - the client session with which to associate this operation
        indexes - the list of indexes
        Returns:
        a Uni completed with the result when the operation is done. The redeemed list contains the created index names.
      • createIndexes

        io.smallrye.mutiny.Uni<List<String>> createIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                           List<com.mongodb.client.model.IndexModel> indexes,
                                                           com.mongodb.client.model.CreateIndexOptions createIndexOptions)
        Create multiple indexes.
        Parameters:
        clientSession - the client session with which to associate this operation
        indexes - the list of indexes
        createIndexOptions - options to use when creating indexes
        Returns:
        a Uni completed with the result when the operation is done. The redeemed list contains the created index names.
      • listIndexes

        io.smallrye.mutiny.Multi<org.bson.Document> listIndexes()
        Get all the indexes in this collection.
        Returns:
        the stream of indexes
      • listIndexes

        <D> io.smallrye.mutiny.Multi<D> listIndexes​(Class<D> clazz)
        Get all the indexes in this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clazz - the class to decode each document into
        Returns:
        the stream of indexes
      • listIndexes

        io.smallrye.mutiny.Multi<org.bson.Document> listIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession)
        Get all the indexes in this collection.
        Parameters:
        clientSession - the client session with which to associate this operation
        Returns:
        the stream of indexes
      • listIndexes

        <D> io.smallrye.mutiny.Multi<D> listIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                    Class<D> clazz)
        Get all the indexes in this collection.
        Type Parameters:
        D - the target document type of the iterable.
        Parameters:
        clientSession - the client session with which to associate this operation
        clazz - the class to decode each document into
        Returns:
        the stream of indexes
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(String indexName)
        Drops the index given the keys used to create it.
        Parameters:
        indexName - the name of the index to remove
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(org.bson.conversions.Bson keys)
        Drops the index given the keys used to create it.
        Parameters:
        keys - the keys of the index to remove
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(String indexName,
                                               com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Drops the index given the keys used to create it.
        Parameters:
        indexName - the name of the index to remove
        dropIndexOptions - options to use when dropping indexes
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(org.bson.conversions.Bson keys,
                                               com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Drops the index given the keys used to create it.
        Parameters:
        keys - the keys of the index to remove
        dropIndexOptions - options to use when dropping indexes
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                               String indexName)
        Drops the index given the keys used to create it.
        Parameters:
        clientSession - the client session with which to associate this operation
        indexName - the name of the index to remove
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                               org.bson.conversions.Bson keys)
        Drops the index given the keys used to create it.
        Parameters:
        clientSession - the client session with which to associate this operation
        keys - the keys of the index to remove
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                               String indexName,
                                               com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Drops the index given the keys used to create it.
        Parameters:
        clientSession - the client session with which to associate this operation
        indexName - the name of the index to remove
        dropIndexOptions - options to use when dropping indexes
        Returns:
        a Uni completed when the operation is done.
      • dropIndex

        io.smallrye.mutiny.Uni<Void> dropIndex​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                               org.bson.conversions.Bson keys,
                                               com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Drops the index given the keys used to create it.
        Parameters:
        clientSession - the client session with which to associate this operation
        keys - the keys of the index to remove
        dropIndexOptions - options to use when dropping indexes
        Returns:
        a Uni completed when the operation is done.
      • dropIndexes

        io.smallrye.mutiny.Uni<Void> dropIndexes()
        Drop all the indexes on this collection, except for the default on _id.
        Returns:
        a Uni completed when the operation is done.
      • dropIndexes

        io.smallrye.mutiny.Uni<Void> dropIndexes​(com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Drop all the indexes on this collection, except for the default on _id.
        Parameters:
        dropIndexOptions - options to use when dropping indexes
        Returns:
        a Uni completed when the operation is done.
      • dropIndexes

        io.smallrye.mutiny.Uni<Void> dropIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession)
        Drop all the indexes on this collection, except for the default on _id.
        Parameters:
        clientSession - the client session with which to associate this operation
        Returns:
        a Uni completed when the operation is done.
      • dropIndexes

        io.smallrye.mutiny.Uni<Void> dropIndexes​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                 com.mongodb.client.model.DropIndexOptions dropIndexOptions)
        Drop all the indexes on this collection, except for the default on _id.
        Parameters:
        clientSession - the client session with which to associate this operation
        dropIndexOptions - options to use when dropping indexes
        Returns:
        a Uni completed when the operation is done.
      • renameCollection

        io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace)
        Rename the collection with oldCollectionName to the newCollectionName.
        Parameters:
        newCollectionNamespace - the name the collection will be renamed to
        Returns:
        a Uni completed when the operation is done.
      • renameCollection

        io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.MongoNamespace newCollectionNamespace,
                                                      com.mongodb.client.model.RenameCollectionOptions options)
        Rename the collection with oldCollectionName to the newCollectionName.
        Parameters:
        newCollectionNamespace - the name the collection will be renamed to
        options - the options for renaming a collection
        Returns:
        a Uni completed when the operation is done.
      • renameCollection

        io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                      com.mongodb.MongoNamespace newCollectionNamespace)
        Rename the collection with oldCollectionName to the newCollectionName.
        Parameters:
        clientSession - the client session with which to associate this operation
        newCollectionNamespace - the name the collection will be renamed to
        Returns:
        a Uni completed when the operation is done.
      • renameCollection

        io.smallrye.mutiny.Uni<Void> renameCollection​(com.mongodb.reactivestreams.client.ClientSession clientSession,
                                                      com.mongodb.MongoNamespace newCollectionNamespace,
                                                      com.mongodb.client.model.RenameCollectionOptions options)
        Rename the collection with oldCollectionName to the newCollectionName.
        Parameters:
        clientSession - the client session with which to associate this operation
        newCollectionNamespace - the name the collection will be renamed to
        options - the options for renaming a collection
        Returns:
        a Uni completed when the operation is done.
      • getCodecRegistry

        org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
        Gets the codec registry of this collection.
        Returns:
        the codec registry
      • withDocumentClass

        <NewTDocument> ReactiveMongoCollection<NewTDocument> withDocumentClass​(Class<NewTDocument> clazz)
        Create a new ReactiveMongoCollection instance with a different default class to cast any documents returned from the database into..
        Type Parameters:
        NewTDocument - The type that the new collection will encode documents from and decode documents to
        Parameters:
        clazz - the default class to cast any documents returned from the database into.
        Returns:
        a new ReactiveMongoCollection instance with the different default class
      • withReadPreference

        ReactiveMongoCollection<T> withReadPreference​(com.mongodb.ReadPreference readPreference)
        Create a new ReactiveMongoCollection instance with a different read preference.
        Parameters:
        readPreference - the new ReadPreference for the collection
        Returns:
        a new ReactiveMongoCollection instance with the different readPreference