Package io.vertx.rxjava.ext.mongo

## Class MongoClient

- java.lang.Object
- - io.vertx.rxjava.ext.mongo.MongoClient

-     public class MongoClient
      extends Object

  A Vert.x service used to interact with MongoDB server instances.

  Some of the operations might change _id field of passed document.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<MongoClient>` | `__TYPE_ARG` |
    `static String` | `DEFAULT_DB_NAME` | The name of the default database
    `static String` | `DEFAULT_POOL_NAME` | The name of the default pool

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MongoClient​(MongoClient delegate)` |
    `MongoClient​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `ReadStream<JsonObject>` | `aggregate​(String collection, JsonArray pipeline)` | Run aggregate MongoDB command with default `AggregateOptions`.
    `ReadStream<JsonObject>` | `aggregateWithOptions​(String collection, JsonArray pipeline, AggregateOptions options)` | Run aggregate MongoDB command.
    `Future<MongoClientBulkWriteResult>` | `bulkWrite​(String collection, List<BulkOperation> operations)` | Execute a bulk operation.
    `Future<MongoClientBulkWriteResult>` | `bulkWriteWithOptions​(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions)` | Execute a bulk operation with the specified write options.
    `Future<Void>` | `close()` | Close the client and release its resources
    `Future<Long>` | `count​(String collection, JsonObject query)` | Count matching documents in a collection.
    `Future<Long>` | `countWithOptions​(String collection, JsonObject query, CountOptions countOptions)` | Count matching documents in a collection.
    `static MongoClient` | `create​(Vertx vertx, JsonObject config)` | Create a Mongo client which maintains its own data source.
    `Future<Void>` | `createCollection​(String collectionName)` | Create a new collection
    `Future<Void>` | `createCollectionWithOptions​(String collectionName, CreateCollectionOptions collectionOptions)` | Create a new collection with options
    `Future<MongoGridFsClient>` | `createDefaultGridFsBucketService()` | Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
    `Future<MongoGridFsClient>` | `createGridFsBucketService​(String bucketName)` | Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
    `Future<Void>` | `createIndex​(String collection, JsonObject key)` | Creates an index.
    `Future<Void>` | `createIndexes​(String collection, List<IndexModel> indexes)` | creates an indexes
    `Future<Void>` | `createIndexWithOptions​(String collection, JsonObject key, IndexOptions options)` | Creates an index.
    `static MongoClient` | `createShared​(Vertx vertx, JsonObject config)` | Like `createShared(io.vertx.rxjava.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)` but with the default data source name
    `static MongoClient` | `createShared​(Vertx vertx, JsonObject config, String dataSourceName)` | Create a Mongo client which shares its data source with any other Mongo clients created with the same data source name
    `Future<JsonArray>` | `distinct​(String collection, String fieldName, String resultClassname)` | Gets the distinct values of the specified field name.
    `Future<JsonArray>` | `distinct​(String collection, String fieldName, String resultClassname, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name.
    `ReadStream<JsonObject>` | `distinctBatch​(String collection, String fieldName, String resultClassname)` | Gets the distinct values of the specified field name.
    `ReadStream<JsonObject>` | `distinctBatch​(String collection, String fieldName, String resultClassname, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name.
    `ReadStream<JsonObject>` | `distinctBatchWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query)` | Gets the distinct values of the specified field name filtered by specified query.
    `ReadStream<JsonObject>` | `distinctBatchWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query, int batchSize)` | Gets the distinct values of the specified field name filtered by specified query.
    `ReadStream<JsonObject>` | `distinctBatchWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query, int batchSize, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name filtered by specified query.
    `ReadStream<JsonObject>` | `distinctBatchWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name filtered by specified query.
    `Future<JsonArray>` | `distinctWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query)` | Gets the distinct values of the specified field name filtered by specified query.
    `Future<JsonArray>` | `distinctWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name filtered by specified query.
    `Future<Void>` | `dropCollection​(String collection)` | Drop a collection
    `Future<Void>` | `dropIndex​(String collection, JsonObject key)` | Drops the index given the keys used to create it.
    `Future<Void>` | `dropIndex​(String collection, String indexName)` | Drops the index given its name.
    `boolean` | `equals​(Object o)` |
    `Future<List<JsonObject>>` | `find​(String collection, JsonObject query)` | Find matching documents in the specified collection
    `ReadStream<JsonObject>` | `findBatch​(String collection, JsonObject query)` | Find matching documents in the specified collection.
    `ReadStream<JsonObject>` | `findBatchWithOptions​(String collection, JsonObject query, FindOptions options)` | Find matching documents in the specified collection, specifying options.
    `Future<JsonObject>` | `findOne​(String collection, JsonObject query, JsonObject fields)` | Find a single matching document in the specified collection
    `Future<JsonObject>` | `findOneAndDelete​(String collection, JsonObject query)` | Find a single matching document in the specified collection and delete it.
    `Future<JsonObject>` | `findOneAndDeleteWithOptions​(String collection, JsonObject query, FindOptions findOptions)` | Find a single matching document in the specified collection and delete it.
    `Future<JsonObject>` | `findOneAndReplace​(String collection, JsonObject query, JsonObject replace)` | Find a single matching document in the specified collection and replace it.
    `Future<JsonObject>` | `findOneAndReplaceWithOptions​(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions)` | Find a single matching document in the specified collection and replace it.
    `Future<JsonObject>` | `findOneAndUpdate​(String collection, JsonObject query, JsonObject update)` | Find a single matching document in the specified collection and update it.
    `Future<JsonObject>` | `findOneAndUpdateWithOptions​(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions)` | Find a single matching document in the specified collection and update it.
    `Future<List<JsonObject>>` | `findWithOptions​(String collection, JsonObject query, FindOptions options)` | Find matching documents in the specified collection, specifying options
    `Future<List<String>>` | `getCollections()` | Get a list of all collections in the database.
    `MongoClient` | `getDelegate()` |
    `int` | `hashCode()` |
    `Future<String>` | `insert​(String collection, JsonObject document)` | Insert a document in the specified collection
    `Future<String>` | `insertWithOptions​(String collection, JsonObject document, WriteOption writeOption)` | Insert a document in the specified collection with the specified write option
    `Future<JsonArray>` | `listIndexes​(String collection)` | Get all the indexes in this collection.
    `static MongoClient` | `newInstance​(MongoClient arg)` |
    `Future<MongoClientDeleteResult>` | `removeDocument​(String collection, JsonObject query)` | Remove a single matching document from a collection and return the handler with `MongoClientDeleteResult` result
    `Future<MongoClientDeleteResult>` | `removeDocuments​(String collection, JsonObject query)` | Remove matching documents from a collection and return the handler with `MongoClientDeleteResult` result
    `Future<MongoClientDeleteResult>` | `removeDocumentsWithOptions​(String collection, JsonObject query, WriteOption writeOption)` | Remove matching documents from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
    `Future<MongoClientDeleteResult>` | `removeDocumentWithOptions​(String collection, JsonObject query, WriteOption writeOption)` | Remove a single matching document from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
    `Future<Void>` | `renameCollection​(String oldCollectionName, String newCollectionName)` | Rename a collection
    `Future<Void>` | `renameCollectionWithOptions​(String oldCollectionName, String newCollectionName, RenameCollectionOptions collectionOptions)` | Rename a collection
    `Future<MongoClientUpdateResult>` | `replaceDocuments​(String collection, JsonObject query, JsonObject replace)` | Replace matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
    `Future<MongoClientUpdateResult>` | `replaceDocumentsWithOptions​(String collection, JsonObject query, JsonObject replace, UpdateOptions options)` | Replace matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
    `Future<JsonObject>` | `runCommand​(String commandName, JsonObject command)` | Run an arbitrary MongoDB command.
    `Single<MongoClientBulkWriteResult>` | `rxBulkWrite​(String collection, List<BulkOperation> operations)` | Execute a bulk operation.
    `Single<MongoClientBulkWriteResult>` | `rxBulkWriteWithOptions​(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions)` | Execute a bulk operation with the specified write options.
    `Single<Void>` | `rxClose()` | Close the client and release its resources
    `Single<Long>` | `rxCount​(String collection, JsonObject query)` | Count matching documents in a collection.
    `Single<Long>` | `rxCountWithOptions​(String collection, JsonObject query, CountOptions countOptions)` | Count matching documents in a collection.
    `Single<Void>` | `rxCreateCollection​(String collectionName)` | Create a new collection
    `Single<Void>` | `rxCreateCollectionWithOptions​(String collectionName, CreateCollectionOptions collectionOptions)` | Create a new collection with options
    `Single<MongoGridFsClient>` | `rxCreateDefaultGridFsBucketService()` | Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
    `Single<MongoGridFsClient>` | `rxCreateGridFsBucketService​(String bucketName)` | Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
    `Single<Void>` | `rxCreateIndex​(String collection, JsonObject key)` | Creates an index.
    `Single<Void>` | `rxCreateIndexes​(String collection, List<IndexModel> indexes)` | creates an indexes
    `Single<Void>` | `rxCreateIndexWithOptions​(String collection, JsonObject key, IndexOptions options)` | Creates an index.
    `Single<JsonArray>` | `rxDistinct​(String collection, String fieldName, String resultClassname)` | Gets the distinct values of the specified field name.
    `Single<JsonArray>` | `rxDistinct​(String collection, String fieldName, String resultClassname, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name.
    `Single<JsonArray>` | `rxDistinctWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query)` | Gets the distinct values of the specified field name filtered by specified query.
    `Single<JsonArray>` | `rxDistinctWithQuery​(String collection, String fieldName, String resultClassname, JsonObject query, DistinctOptions distinctOptions)` | Gets the distinct values of the specified field name filtered by specified query.
    `Single<Void>` | `rxDropCollection​(String collection)` | Drop a collection
    `Single<Void>` | `rxDropIndex​(String collection, JsonObject key)` | Drops the index given the keys used to create it.
    `Single<Void>` | `rxDropIndex​(String collection, String indexName)` | Drops the index given its name.
    `Single<List<JsonObject>>` | `rxFind​(String collection, JsonObject query)` | Find matching documents in the specified collection
    `Single<JsonObject>` | `rxFindOne​(String collection, JsonObject query, JsonObject fields)` | Find a single matching document in the specified collection
    `Single<JsonObject>` | `rxFindOneAndDelete​(String collection, JsonObject query)` | Find a single matching document in the specified collection and delete it.
    `Single<JsonObject>` | `rxFindOneAndDeleteWithOptions​(String collection, JsonObject query, FindOptions findOptions)` | Find a single matching document in the specified collection and delete it.
    `Single<JsonObject>` | `rxFindOneAndReplace​(String collection, JsonObject query, JsonObject replace)` | Find a single matching document in the specified collection and replace it.
    `Single<JsonObject>` | `rxFindOneAndReplaceWithOptions​(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions)` | Find a single matching document in the specified collection and replace it.
    `Single<JsonObject>` | `rxFindOneAndUpdate​(String collection, JsonObject query, JsonObject update)` | Find a single matching document in the specified collection and update it.
    `Single<JsonObject>` | `rxFindOneAndUpdateWithOptions​(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions)` | Find a single matching document in the specified collection and update it.
    `Single<List<JsonObject>>` | `rxFindWithOptions​(String collection, JsonObject query, FindOptions options)` | Find matching documents in the specified collection, specifying options
    `Single<List<String>>` | `rxGetCollections()` | Get a list of all collections in the database.
    `Single<String>` | `rxInsert​(String collection, JsonObject document)` | Insert a document in the specified collection
    `Single<String>` | `rxInsertWithOptions​(String collection, JsonObject document, WriteOption writeOption)` | Insert a document in the specified collection with the specified write option
    `Single<JsonArray>` | `rxListIndexes​(String collection)` | Get all the indexes in this collection.
    `Single<MongoClientDeleteResult>` | `rxRemoveDocument​(String collection, JsonObject query)` | Remove a single matching document from a collection and return the handler with `MongoClientDeleteResult` result
    `Single<MongoClientDeleteResult>` | `rxRemoveDocuments​(String collection, JsonObject query)` | Remove matching documents from a collection and return the handler with `MongoClientDeleteResult` result
    `Single<MongoClientDeleteResult>` | `rxRemoveDocumentsWithOptions​(String collection, JsonObject query, WriteOption writeOption)` | Remove matching documents from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
    `Single<MongoClientDeleteResult>` | `rxRemoveDocumentWithOptions​(String collection, JsonObject query, WriteOption writeOption)` | Remove a single matching document from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
    `Single<Void>` | `rxRenameCollection​(String oldCollectionName, String newCollectionName)` | Rename a collection
    `Single<Void>` | `rxRenameCollectionWithOptions​(String oldCollectionName, String newCollectionName, RenameCollectionOptions collectionOptions)` | Rename a collection
    `Single<MongoClientUpdateResult>` | `rxReplaceDocuments​(String collection, JsonObject query, JsonObject replace)` | Replace matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
    `Single<MongoClientUpdateResult>` | `rxReplaceDocumentsWithOptions​(String collection, JsonObject query, JsonObject replace, UpdateOptions options)` | Replace matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
    `Single<JsonObject>` | `rxRunCommand​(String commandName, JsonObject command)` | Run an arbitrary MongoDB command.
    `Single<String>` | `rxSave​(String collection, JsonObject document)` | Save a document in the specified collection
    `Single<String>` | `rxSaveWithOptions​(String collection, JsonObject document, WriteOption writeOption)` | Save a document in the specified collection with the specified write option
    `Single<MongoClientUpdateResult>` | `rxUpdateCollection​(String collection, JsonObject query, JsonArray update)` | Use an aggregation pipeline to update documents in the specified collection and return the handler with `MongoClientUpdateResult` result
    `Single<MongoClientUpdateResult>` | `rxUpdateCollection​(String collection, JsonObject query, JsonObject update)` | Update matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
    `Single<MongoClientUpdateResult>` | `rxUpdateCollectionWithOptions​(String collection, JsonObject query, JsonArray update, UpdateOptions options)` | Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
    `Single<MongoClientUpdateResult>` | `rxUpdateCollectionWithOptions​(String collection, JsonObject query, JsonObject update, UpdateOptions options)` | Update matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
    `Future<String>` | `save​(String collection, JsonObject document)` | Save a document in the specified collection
    `Future<String>` | `saveWithOptions​(String collection, JsonObject document, WriteOption writeOption)` | Save a document in the specified collection with the specified write option
    `String` | `toString()` |
    `Future<MongoClientUpdateResult>` | `updateCollection​(String collection, JsonObject query, JsonArray update)` | Use an aggregation pipeline to update documents in the specified collection and return the handler with `MongoClientUpdateResult` result
    `Future<MongoClientUpdateResult>` | `updateCollection​(String collection, JsonObject query, JsonObject update)` | Update matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
    `Future<MongoClientUpdateResult>` | `updateCollectionWithOptions​(String collection, JsonObject query, JsonArray update, UpdateOptions options)` | Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
    `Future<MongoClientUpdateResult>` | `updateCollectionWithOptions​(String collection, JsonObject query, JsonObject update, UpdateOptions options)` | Update matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
    `ReadStream<com.mongodb.client.model.changestream.ChangeStreamDocument<JsonObject>>` | `watch​(String collection, JsonArray pipeline, boolean withUpdatedDoc, int batchSize)` | Watch the collection change.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<MongoClient> __TYPE_ARG

    - #### DEFAULT_POOL_NAME

          public static final String DEFAULT_POOL_NAME

      The name of the default pool
      See Also:
        Constant Field Values

    - #### DEFAULT_DB_NAME

          public static final String DEFAULT_DB_NAME

      The name of the default database
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### MongoClient

          public MongoClient​(MongoClient delegate)

    - #### MongoClient

          public MongoClient​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public MongoClient getDelegate()

    - #### create

          public static MongoClient create​(Vertx vertx,
                                           JsonObject config)

      Create a Mongo client which maintains its own data source.
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
      Returns:
        the client

    - #### createShared

          public static MongoClient createShared​(Vertx vertx,
                                                 JsonObject config,
                                                 String dataSourceName)

      Create a Mongo client which shares its data source with any other Mongo clients created with the same data source name
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
        `dataSourceName` - the data source name
      Returns:
        the client

    - #### createShared

          public static MongoClient createShared​(Vertx vertx,
                                                 JsonObject config)

      Like `createShared(io.vertx.rxjava.core.Vertx, io.vertx.core.json.JsonObject, java.lang.String)` but with the default data source name
      Parameters:
        `vertx` - the Vert.x instance
        `config` - the configuration
      Returns:
        the client

    - #### save

          public Future<String> save​(String collection,
                                     JsonObject document)

      Save a document in the specified collection

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
      Returns:
        a future provided with the id if document didn't already have one

    - #### rxSave

          public Single<String> rxSave​(String collection,
                                       JsonObject document)

      Save a document in the specified collection

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
      Returns:
        a future provided with the id if document didn't already have one

    - #### saveWithOptions

          public Future<String> saveWithOptions​(String collection,
                                                JsonObject document,
                                                WriteOption writeOption)

      Save a document in the specified collection with the specified write option

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
        `writeOption` - the write option to use
      Returns:
        a future provided with the id if document didn't already have one

    - #### rxSaveWithOptions

          public Single<String> rxSaveWithOptions​(String collection,
                                                  JsonObject document,
                                                  WriteOption writeOption)

      Save a document in the specified collection with the specified write option

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
        `writeOption` - the write option to use
      Returns:
        a future provided with the id if document didn't already have one

    - #### insert

          public Future<String> insert​(String collection,
                                       JsonObject document)

      Insert a document in the specified collection

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
      Returns:
        a future provided with the id if document didn't already have one

    - #### rxInsert

          public Single<String> rxInsert​(String collection,
                                         JsonObject document)

      Insert a document in the specified collection

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
      Returns:
        a future provided with the id if document didn't already have one

    - #### insertWithOptions

          public Future<String> insertWithOptions​(String collection,
                                                  JsonObject document,
                                                  WriteOption writeOption)

      Insert a document in the specified collection with the specified write option

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
        `writeOption` - the write option to use
      Returns:
        a future provided with the id if document didn't already have one

    - #### rxInsertWithOptions

          public Single<String> rxInsertWithOptions​(String collection,
                                                    JsonObject document,
                                                    WriteOption writeOption)

      Insert a document in the specified collection with the specified write option

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
        `writeOption` - the write option to use
      Returns:
        a future provided with the id if document didn't already have one

    - #### updateCollection

          public Future<MongoClientUpdateResult> updateCollection​(String collection,
                                                                  JsonObject query,
                                                                  JsonObject update)

      Update matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### rxUpdateCollection

          public Single<MongoClientUpdateResult> rxUpdateCollection​(String collection,
                                                                    JsonObject query,
                                                                    JsonObject update)

      Update matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### updateCollection

          public Future<MongoClientUpdateResult> updateCollection​(String collection,
                                                                  JsonObject query,
                                                                  JsonArray update)

      Use an aggregation pipeline to update documents in the specified collection and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### rxUpdateCollection

          public Single<MongoClientUpdateResult> rxUpdateCollection​(String collection,
                                                                    JsonObject query,
                                                                    JsonArray update)

      Use an aggregation pipeline to update documents in the specified collection and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### updateCollectionWithOptions

          public Future<MongoClientUpdateResult> updateCollectionWithOptions​(String collection,
                                                                             JsonObject query,
                                                                             JsonObject update,
                                                                             UpdateOptions options)

      Update matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
        `options` - options to configure the update
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### rxUpdateCollectionWithOptions

          public Single<MongoClientUpdateResult> rxUpdateCollectionWithOptions​(String collection,
                                                                               JsonObject query,
                                                                               JsonObject update,
                                                                               UpdateOptions options)

      Update matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
        `options` - options to configure the update
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### updateCollectionWithOptions

          public Future<MongoClientUpdateResult> updateCollectionWithOptions​(String collection,
                                                                             JsonObject query,
                                                                             JsonArray update,
                                                                             UpdateOptions options)

      Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - aggregation pipeline used to describe how documents will be updated
        `options` - options to configure the update
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### rxUpdateCollectionWithOptions

          public Single<MongoClientUpdateResult> rxUpdateCollectionWithOptions​(String collection,
                                                                               JsonObject query,
                                                                               JsonArray update,
                                                                               UpdateOptions options)

      Use an aggregation pipeline to update documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - aggregation pipeline used to describe how documents will be updated
        `options` - options to configure the update
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### replaceDocuments

          public Future<MongoClientUpdateResult> replaceDocuments​(String collection,
                                                                  JsonObject query,
                                                                  JsonObject replace)

      Replace matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `replace` - all matching documents will be replaced with this
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### rxReplaceDocuments

          public Single<MongoClientUpdateResult> rxReplaceDocuments​(String collection,
                                                                    JsonObject query,
                                                                    JsonObject replace)

      Replace matching documents in the specified collection and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `replace` - all matching documents will be replaced with this
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### replaceDocumentsWithOptions

          public Future<MongoClientUpdateResult> replaceDocumentsWithOptions​(String collection,
                                                                             JsonObject query,
                                                                             JsonObject replace,
                                                                             UpdateOptions options)

      Replace matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `replace` - all matching documents will be replaced with this
        `options` - options to configure the replace
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### rxReplaceDocumentsWithOptions

          public Single<MongoClientUpdateResult> rxReplaceDocumentsWithOptions​(String collection,
                                                                               JsonObject query,
                                                                               JsonObject replace,
                                                                               UpdateOptions options)

      Replace matching documents in the specified collection, specifying options and return the handler with `MongoClientUpdateResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `replace` - all matching documents will be replaced with this
        `options` - options to configure the replace
      Returns:
        a future notified with a `MongoClientUpdateResult` when complete

    - #### bulkWrite

          public Future<MongoClientBulkWriteResult> bulkWrite​(String collection,
                                                              List<BulkOperation> operations)

      Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
      Parameters:
        `collection` - the collection
        `operations` - the operations to execute
      Returns:
        a future notified with a `MongoClientBulkWriteResult` when complete

    - #### rxBulkWrite

          public Single<MongoClientBulkWriteResult> rxBulkWrite​(String collection,
                                                                List<BulkOperation> operations)

      Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
      Parameters:
        `collection` - the collection
        `operations` - the operations to execute
      Returns:
        a future notified with a `MongoClientBulkWriteResult` when complete

    - #### bulkWriteWithOptions

          public Future<MongoClientBulkWriteResult> bulkWriteWithOptions​(String collection,
                                                                         List<BulkOperation> operations,
                                                                         BulkWriteOptions bulkWriteOptions)

      Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.
      Parameters:
        `collection` - the collection
        `operations` - the operations to execute
        `bulkWriteOptions` - the write options
      Returns:
        a future notified with a `MongoClientBulkWriteResult` when complete

    - #### rxBulkWriteWithOptions

          public Single<MongoClientBulkWriteResult> rxBulkWriteWithOptions​(String collection,
                                                                           List<BulkOperation> operations,
                                                                           BulkWriteOptions bulkWriteOptions)

      Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.
      Parameters:
        `collection` - the collection
        `operations` - the operations to execute
        `bulkWriteOptions` - the write options
      Returns:
        a future notified with a `MongoClientBulkWriteResult` when complete

    - #### find

          public Future<List<JsonObject>> find​(String collection,
                                               JsonObject query)

      Find matching documents in the specified collection
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a future provided with list of documents

    - #### rxFind

          public Single<List<JsonObject>> rxFind​(String collection,
                                                 JsonObject query)

      Find matching documents in the specified collection
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a future provided with list of documents

    - #### findBatch

          public ReadStream<JsonObject> findBatch​(String collection,
                                                  JsonObject query)

      Find matching documents in the specified collection. This method use batchCursor for returning each found document.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a emitting found documents

    - #### findWithOptions

          public Future<List<JsonObject>> findWithOptions​(String collection,
                                                          JsonObject query,
                                                          FindOptions options)

      Find matching documents in the specified collection, specifying options
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `options` - options to configure the find
      Returns:
        a future provided with list of documents

    - #### rxFindWithOptions

          public Single<List<JsonObject>> rxFindWithOptions​(String collection,
                                                            JsonObject query,
                                                            FindOptions options)

      Find matching documents in the specified collection, specifying options
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `options` - options to configure the find
      Returns:
        a future provided with list of documents

    - #### findBatchWithOptions

          public ReadStream<JsonObject> findBatchWithOptions​(String collection,
                                                             JsonObject query,
                                                             FindOptions options)

      Find matching documents in the specified collection, specifying options. This method use batchCursor for returning each found document.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `options` - options to configure the find
      Returns:
        a emitting found documents

    - #### findOne

          public Future<JsonObject> findOne​(String collection,
                                            JsonObject query,
                                            JsonObject fields)

      Find a single matching document in the specified collection

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `fields` - the fields
      Returns:
        a future provided with the document, if any

    - #### rxFindOne

          public Single<JsonObject> rxFindOne​(String collection,
                                              JsonObject query,
                                              JsonObject fields)

      Find a single matching document in the specified collection

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `fields` - the fields
      Returns:
        a future provided with the document, if any

    - #### findOneAndUpdate

          public Future<JsonObject> findOneAndUpdate​(String collection,
                                                     JsonObject query,
                                                     JsonObject update)

      Find a single matching document in the specified collection and update it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `update` - used to describe how the documents will be updated
      Returns:
        a future provided with the document, if any

    - #### rxFindOneAndUpdate

          public Single<JsonObject> rxFindOneAndUpdate​(String collection,
                                                       JsonObject query,
                                                       JsonObject update)

      Find a single matching document in the specified collection and update it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `update` - used to describe how the documents will be updated
      Returns:
        a future provided with the document, if any

    - #### findOneAndUpdateWithOptions

          public Future<JsonObject> findOneAndUpdateWithOptions​(String collection,
                                                                JsonObject query,
                                                                JsonObject update,
                                                                FindOptions findOptions,
                                                                UpdateOptions updateOptions)

      Find a single matching document in the specified collection and update it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `update` - used to describe how the documents will be updated
        `findOptions` - options to configure the find
        `updateOptions` - options to configure the update
      Returns:
        a future provided with the document, if any

    - #### rxFindOneAndUpdateWithOptions

          public Single<JsonObject> rxFindOneAndUpdateWithOptions​(String collection,
                                                                  JsonObject query,
                                                                  JsonObject update,
                                                                  FindOptions findOptions,
                                                                  UpdateOptions updateOptions)

      Find a single matching document in the specified collection and update it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `update` - used to describe how the documents will be updated
        `findOptions` - options to configure the find
        `updateOptions` - options to configure the update
      Returns:
        a future provided with the document, if any

    - #### findOneAndReplace

          public Future<JsonObject> findOneAndReplace​(String collection,
                                                      JsonObject query,
                                                      JsonObject replace)

      Find a single matching document in the specified collection and replace it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `replace` - the replacement document
      Returns:
        a future provided with the document, if any

    - #### rxFindOneAndReplace

          public Single<JsonObject> rxFindOneAndReplace​(String collection,
                                                        JsonObject query,
                                                        JsonObject replace)

      Find a single matching document in the specified collection and replace it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `replace` - the replacement document
      Returns:
        a future provided with the document, if any

    - #### findOneAndReplaceWithOptions

          public Future<JsonObject> findOneAndReplaceWithOptions​(String collection,
                                                                 JsonObject query,
                                                                 JsonObject replace,
                                                                 FindOptions findOptions,
                                                                 UpdateOptions updateOptions)

      Find a single matching document in the specified collection and replace it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `replace` - the replacement document
        `findOptions` - options to configure the find
        `updateOptions` - options to configure the update
      Returns:
        a future provided with the document, if any

    - #### rxFindOneAndReplaceWithOptions

          public Single<JsonObject> rxFindOneAndReplaceWithOptions​(String collection,
                                                                   JsonObject query,
                                                                   JsonObject replace,
                                                                   FindOptions findOptions,
                                                                   UpdateOptions updateOptions)

      Find a single matching document in the specified collection and replace it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `replace` - the replacement document
        `findOptions` - options to configure the find
        `updateOptions` - options to configure the update
      Returns:
        a future provided with the document, if any

    - #### findOneAndDelete

          public Future<JsonObject> findOneAndDelete​(String collection,
                                                     JsonObject query)

      Find a single matching document in the specified collection and delete it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
      Returns:
        a future provided with the deleted document, if any

    - #### rxFindOneAndDelete

          public Single<JsonObject> rxFindOneAndDelete​(String collection,
                                                       JsonObject query)

      Find a single matching document in the specified collection and delete it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
      Returns:
        a future provided with the deleted document, if any

    - #### findOneAndDeleteWithOptions

          public Future<JsonObject> findOneAndDeleteWithOptions​(String collection,
                                                                JsonObject query,
                                                                FindOptions findOptions)

      Find a single matching document in the specified collection and delete it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `findOptions` - options to configure the find
      Returns:
        a future provided with the deleted document, if any

    - #### rxFindOneAndDeleteWithOptions

          public Single<JsonObject> rxFindOneAndDeleteWithOptions​(String collection,
                                                                  JsonObject query,
                                                                  FindOptions findOptions)

      Find a single matching document in the specified collection and delete it.

      This operation might change _id field of query parameter

      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `findOptions` - options to configure the find
      Returns:
        a future provided with the deleted document, if any

    - #### count

          public Future<Long> count​(String collection,
                                    JsonObject query)

      Count matching documents in a collection.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a future provided with the number of matching documents

    - #### rxCount

          public Single<Long> rxCount​(String collection,
                                      JsonObject query)

      Count matching documents in a collection.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a future provided with the number of matching documents

    - #### countWithOptions

          public Future<Long> countWithOptions​(String collection,
                                               JsonObject query,
                                               CountOptions countOptions)

      Count matching documents in a collection.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `countOptions` -
      Returns:
        a future provided with the number of matching documents

    - #### rxCountWithOptions

          public Single<Long> rxCountWithOptions​(String collection,
                                                 JsonObject query,
                                                 CountOptions countOptions)

      Count matching documents in a collection.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `countOptions` -
      Returns:
        a future provided with the number of matching documents

    - #### removeDocuments

          public Future<MongoClientDeleteResult> removeDocuments​(String collection,
                                                                 JsonObject query)

      Remove matching documents from a collection and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### rxRemoveDocuments

          public Single<MongoClientDeleteResult> rxRemoveDocuments​(String collection,
                                                                   JsonObject query)

      Remove matching documents from a collection and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### removeDocumentsWithOptions

          public Future<MongoClientDeleteResult> removeDocumentsWithOptions​(String collection,
                                                                            JsonObject query,
                                                                            WriteOption writeOption)

      Remove matching documents from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `writeOption` - the write option to use
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### rxRemoveDocumentsWithOptions

          public Single<MongoClientDeleteResult> rxRemoveDocumentsWithOptions​(String collection,
                                                                              JsonObject query,
                                                                              WriteOption writeOption)

      Remove matching documents from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `writeOption` - the write option to use
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### removeDocument

          public Future<MongoClientDeleteResult> removeDocument​(String collection,
                                                                JsonObject query)

      Remove a single matching document from a collection and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match document
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### rxRemoveDocument

          public Single<MongoClientDeleteResult> rxRemoveDocument​(String collection,
                                                                  JsonObject query)

      Remove a single matching document from a collection and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match document
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### removeDocumentWithOptions

          public Future<MongoClientDeleteResult> removeDocumentWithOptions​(String collection,
                                                                           JsonObject query,
                                                                           WriteOption writeOption)

      Remove a single matching document from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `writeOption` - the write option to use
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### rxRemoveDocumentWithOptions

          public Single<MongoClientDeleteResult> rxRemoveDocumentWithOptions​(String collection,
                                                                             JsonObject query,
                                                                             WriteOption writeOption)

      Remove a single matching document from a collection with the specified write option and return the handler with `MongoClientDeleteResult` result
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `writeOption` - the write option to use
      Returns:
        a future notified with a `MongoClientDeleteResult` when complete

    - #### createCollection

          public Future<Void> createCollection​(String collectionName)

      Create a new collection
      Parameters:
        `collectionName` - the name of the collection
      Returns:
        a future notified once complete

    - #### rxCreateCollection

          public Single<Void> rxCreateCollection​(String collectionName)

      Create a new collection
      Parameters:
        `collectionName` - the name of the collection
      Returns:
        a future notified once complete

    - #### createCollectionWithOptions

          public Future<Void> createCollectionWithOptions​(String collectionName,
                                                          CreateCollectionOptions collectionOptions)

      Create a new collection with options
      Parameters:
        `collectionName` - the name of the collection
        `collectionOptions` - options of the collection
      Returns:
        a future notified once complete

    - #### rxCreateCollectionWithOptions

          public Single<Void> rxCreateCollectionWithOptions​(String collectionName,
                                                            CreateCollectionOptions collectionOptions)

      Create a new collection with options
      Parameters:
        `collectionName` - the name of the collection
        `collectionOptions` - options of the collection
      Returns:
        a future notified once complete

    - #### getCollections

          public Future<List<String>> getCollections()

      Get a list of all collections in the database.
      Returns:
        a future notified with a list of collections.

    - #### rxGetCollections

          public Single<List<String>> rxGetCollections()

      Get a list of all collections in the database.
      Returns:
        a future notified with a list of collections.

    - #### dropCollection

          public Future<Void> dropCollection​(String collection)

      Drop a collection
      Parameters:
        `collection` - the collection
      Returns:
        a future notified when complete

    - #### rxDropCollection

          public Single<Void> rxDropCollection​(String collection)

      Drop a collection
      Parameters:
        `collection` - the collection
      Returns:
        a future notified when complete

    - #### renameCollection

          public Future<Void> renameCollection​(String oldCollectionName,
                                               String newCollectionName)

      Rename a collection
      Parameters:
        `oldCollectionName` - the name of the collection
        `newCollectionName` - the new name of the collection
      Returns:
        a future notified when complete

    - #### rxRenameCollection

          public Single<Void> rxRenameCollection​(String oldCollectionName,
                                                 String newCollectionName)

      Rename a collection
      Parameters:
        `oldCollectionName` - the name of the collection
        `newCollectionName` - the new name of the collection
      Returns:
        a future notified when complete

    - #### renameCollectionWithOptions

          public Future<Void> renameCollectionWithOptions​(String oldCollectionName,
                                                          String newCollectionName,
                                                          RenameCollectionOptions collectionOptions)

      Rename a collection
      Parameters:
        `oldCollectionName` - the name of the collection
        `newCollectionName` - the new name of the collection
        `collectionOptions` - options of the collection
      Returns:
        a future notified when complete

    - #### rxRenameCollectionWithOptions

          public Single<Void> rxRenameCollectionWithOptions​(String oldCollectionName,
                                                            String newCollectionName,
                                                            RenameCollectionOptions collectionOptions)

      Rename a collection
      Parameters:
        `oldCollectionName` - the name of the collection
        `newCollectionName` - the new name of the collection
        `collectionOptions` - options of the collection
      Returns:
        a future notified when complete

    - #### createIndex

          public Future<Void> createIndex​(String collection,
                                          JsonObject key)

      Creates an index.
      Parameters:
        `collection` - the collection
        `key` - A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
      Returns:
        a future notified when complete

    - #### rxCreateIndex

          public Single<Void> rxCreateIndex​(String collection,
                                            JsonObject key)

      Creates an index.
      Parameters:
        `collection` - the collection
        `key` - A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
      Returns:
        a future notified when complete

    - #### createIndexWithOptions

          public Future<Void> createIndexWithOptions​(String collection,
                                                     JsonObject key,
                                                     IndexOptions options)

      Creates an index.
      Parameters:
        `collection` - the collection
        `key` - A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
        `options` - the options for the index
      Returns:
        a future notified when complete

    - #### rxCreateIndexWithOptions

          public Single<Void> rxCreateIndexWithOptions​(String collection,
                                                       JsonObject key,
                                                       IndexOptions options)

      Creates an index.
      Parameters:
        `collection` - the collection
        `key` - A document that contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
        `options` - the options for the index
      Returns:
        a future notified when complete

    - #### createIndexes

          public Future<Void> createIndexes​(String collection,
                                            List<IndexModel> indexes)

      creates an indexes
      Parameters:
        `collection` - the collection
        `indexes` - A model that contains pairs of document and indexOptions, document contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
      Returns:
        a future notified when complete

    - #### rxCreateIndexes

          public Single<Void> rxCreateIndexes​(String collection,
                                              List<IndexModel> indexes)

      creates an indexes
      Parameters:
        `collection` - the collection
        `indexes` - A model that contains pairs of document and indexOptions, document contains the field and value pairs where the field is the index key and the value describes the type of index for that field. For an ascending index on a field, specify a value of 1; for descending index, specify a value of -1.
      Returns:
        a future notified when complete

    - #### listIndexes

          public Future<JsonArray> listIndexes​(String collection)

      Get all the indexes in this collection.
      Parameters:
        `collection` - the collection
      Returns:
        a future notified when complete

    - #### rxListIndexes

          public Single<JsonArray> rxListIndexes​(String collection)

      Get all the indexes in this collection.
      Parameters:
        `collection` - the collection
      Returns:
        a future notified when complete

    - #### dropIndex

          public Future<Void> dropIndex​(String collection,
                                        String indexName)

      Drops the index given its name.
      Parameters:
        `collection` - the collection
        `indexName` - the name of the index to remove
      Returns:
        a future notified when complete

    - #### rxDropIndex

          public Single<Void> rxDropIndex​(String collection,
                                          String indexName)

      Drops the index given its name.
      Parameters:
        `collection` - the collection
        `indexName` - the name of the index to remove
      Returns:
        a future notified when complete

    - #### dropIndex

          public Future<Void> dropIndex​(String collection,
                                        JsonObject key)

      Drops the index given the keys used to create it.
      Parameters:
        `collection` - the collection
        `key` - the key(s) of the index to remove
      Returns:
        a future notified when complete

    - #### rxDropIndex

          public Single<Void> rxDropIndex​(String collection,
                                          JsonObject key)

      Drops the index given the keys used to create it.
      Parameters:
        `collection` - the collection
        `key` - the key(s) of the index to remove
      Returns:
        a future notified when complete

    - #### runCommand

          public Future<JsonObject> runCommand​(String commandName,
                                               JsonObject command)

      Run an arbitrary MongoDB command.
      Parameters:
        `commandName` - the name of the command
        `command` - the command
      Returns:
        a future notified with the result.

    - #### rxRunCommand

          public Single<JsonObject> rxRunCommand​(String commandName,
                                                 JsonObject command)

      Run an arbitrary MongoDB command.
      Parameters:
        `commandName` - the name of the command
        `command` - the command
      Returns:
        a future notified with the result.

    - #### distinct

          public Future<JsonArray> distinct​(String collection,
                                            String fieldName,
                                            String resultClassname)

      Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
      Returns:
        a future provided with array of values.

    - #### rxDistinct

          public Single<JsonArray> rxDistinct​(String collection,
                                              String fieldName,
                                              String resultClassname)

      Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
      Returns:
        a future provided with array of values.

    - #### distinct

          public Future<JsonArray> distinct​(String collection,
                                            String fieldName,
                                            String resultClassname,
                                            DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `distinctOptions` - options (e.g. collation)
      Returns:
        a future provided with array of values.

    - #### rxDistinct

          public Single<JsonArray> rxDistinct​(String collection,
                                              String fieldName,
                                              String resultClassname,
                                              DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `distinctOptions` - options (e.g. collation)
      Returns:
        a future provided with array of values.

    - #### distinctWithQuery

          public Future<JsonArray> distinctWithQuery​(String collection,
                                                     String fieldName,
                                                     String resultClassname,
                                                     JsonObject query)

      Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
      Returns:
        a future provided with array of values.

    - #### rxDistinctWithQuery

          public Single<JsonArray> rxDistinctWithQuery​(String collection,
                                                       String fieldName,
                                                       String resultClassname,
                                                       JsonObject query)

      Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
      Returns:
        a future provided with array of values.

    - #### distinctWithQuery

          public Future<JsonArray> distinctWithQuery​(String collection,
                                                     String fieldName,
                                                     String resultClassname,
                                                     JsonObject query,
                                                     DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
        `distinctOptions` - options (e.g. collation)
      Returns:
        a future provided with array of values.

    - #### rxDistinctWithQuery

          public Single<JsonArray> rxDistinctWithQuery​(String collection,
                                                       String fieldName,
                                                       String resultClassname,
                                                       JsonObject query,
                                                       DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
        `distinctOptions` - options (e.g. collation)
      Returns:
        a future provided with array of values.

    - #### distinctBatch

          public ReadStream<JsonObject> distinctBatch​(String collection,
                                                      String fieldName,
                                                      String resultClassname)

      Gets the distinct values of the specified field name. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
      Returns:
        a emitting json fragments

    - #### distinctBatch

          public ReadStream<JsonObject> distinctBatch​(String collection,
                                                      String fieldName,
                                                      String resultClassname,
                                                      DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `distinctOptions` - options (e.g. collation)
      Returns:
        a emitting json fragments

    - #### distinctBatchWithQuery

          public ReadStream<JsonObject> distinctBatchWithQuery​(String collection,
                                                               String fieldName,
                                                               String resultClassname,
                                                               JsonObject query)

      Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
      Returns:
        a emitting json fragments

    - #### distinctBatchWithQuery

          public ReadStream<JsonObject> distinctBatchWithQuery​(String collection,
                                                               String fieldName,
                                                               String resultClassname,
                                                               JsonObject query,
                                                               DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
        `distinctOptions` - options (e.g. collation)
      Returns:
        a emitting json fragments

    - #### distinctBatchWithQuery

          public ReadStream<JsonObject> distinctBatchWithQuery​(String collection,
                                                               String fieldName,
                                                               String resultClassname,
                                                               JsonObject query,
                                                               int batchSize)

      Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
        `batchSize` - the number of documents to load in a batch
      Returns:
        a emitting json fragments

    - #### distinctBatchWithQuery

          public ReadStream<JsonObject> distinctBatchWithQuery​(String collection,
                                                               String fieldName,
                                                               String resultClassname,
                                                               JsonObject query,
                                                               int batchSize,
                                                               DistinctOptions distinctOptions)

      Gets the distinct values of the specified field name filtered by specified query. This method use batchCursor for returning each found value. Each value is a json fragment with fieldName key (eg: {"num": 1}).
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultClassname` -
        `query` - the query
        `batchSize` - the number of documents to load in a batch
        `distinctOptions` - options (e.g. collation)
      Returns:
        a emitting json fragments

    - #### aggregate

          public ReadStream<JsonObject> aggregate​(String collection,
                                                  JsonArray pipeline)

      Run aggregate MongoDB command with default `AggregateOptions`.
      Parameters:
        `collection` - the collection
        `pipeline` - aggregation pipeline to be executed
      Returns:

    - #### aggregateWithOptions

          public ReadStream<JsonObject> aggregateWithOptions​(String collection,
                                                             JsonArray pipeline,
                                                             AggregateOptions options)

      Run aggregate MongoDB command.
      Parameters:
        `collection` - the collection
        `pipeline` - aggregation pipeline to be executed
        `options` - options to configure the aggregation command
      Returns:

    - #### createDefaultGridFsBucketService

          public Future<MongoGridFsClient> createDefaultGridFsBucketService()

      Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
      Returns:
        a future notified with the `MongoGridFsClient` to interact with the bucket named bucketName

    - #### rxCreateDefaultGridFsBucketService

          public Single<MongoGridFsClient> rxCreateDefaultGridFsBucketService()

      Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
      Returns:
        a future notified with the `MongoGridFsClient` to interact with the bucket named bucketName

    - #### createGridFsBucketService

          public Future<MongoGridFsClient> createGridFsBucketService​(String bucketName)

      Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
      Parameters:
        `bucketName` - the name of the GridFS bucket
      Returns:
        a future notified with the `MongoGridFsClient` to interact with the bucket named bucketName

    - #### rxCreateGridFsBucketService

          public Single<MongoGridFsClient> rxCreateGridFsBucketService​(String bucketName)

      Creates a `MongoGridFsClient` used to interact with Mongo GridFS.
      Parameters:
        `bucketName` - the name of the GridFS bucket
      Returns:
        a future notified with the `MongoGridFsClient` to interact with the bucket named bucketName

    - #### close

          public Future<Void> close()

      Close the client and release its resources
      Returns:

    - #### rxClose

          public Single<Void> rxClose()

      Close the client and release its resources
      Returns:

    - #### watch

          public ReadStream<com.mongodb.client.model.changestream.ChangeStreamDocument<JsonObject>> watch​(String collection,
                                                                                                          JsonArray pipeline,
                                                                                                          boolean withUpdatedDoc,
                                                                                                          int batchSize)

      Watch the collection change.
      Parameters:
        `collection` - the collection
        `pipeline` - watching pipeline to be executed
        `withUpdatedDoc` - whether to get updated fullDocument for "update" operation
        `batchSize` - the number of documents to load in a batch
      Returns:

    - #### newInstance

          public static MongoClient newInstance​(MongoClient arg)