io.vertx.reactivex.ext.mongo

## Class MongoClient

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

- Direct Known Subclasses:
    MongoService

      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 and 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 and Description
    `MongoClient(MongoClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and 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.
    `MongoClient` | `bulkWrite(String collection, List<BulkOperation> operations, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)` Execute a bulk operation.
    `MongoClient` | `bulkWriteWithOptions(String collection, List<BulkOperation> operations, BulkWriteOptions bulkWriteOptions, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)` Execute a bulk operation with the specified write options.
    `void` | `close()` Close the client and release its resources
    `MongoClient` | `count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler)` Count matching documents in a collection.
    `MongoClient` | `createCollection(String collectionName, Handler<AsyncResult<Void>> resultHandler)` Create a new collection
    `MongoClient` | `createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler)` Creates an index.
    `MongoClient` | `createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler)` Creates an index.
    `static MongoClient` | `createNonShared(Vertx vertx, JsonObject config)` Create a Mongo client which maintains its own data source.
    `static MongoClient` | `createShared(Vertx vertx, JsonObject config)` Like `createShared(io.vertx.reactivex.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
    `MongoClient` | `distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler)` 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>` | `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.
    `MongoClient` | `distinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query, Handler<AsyncResult<JsonArray>> resultHandler)` Gets the distinct values of the specified field name filtered by specified query.
    `MongoClient` | `dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler)` Drop a collection
    `MongoClient` | `dropIndex(String collection, String indexName, Handler<AsyncResult<Void>> resultHandler)` Drops the index given its name.
    `boolean` | `equals(Object o)`
    `MongoClient` | `find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler)` 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.
    `MongoClient` | `findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection
    `MongoClient` | `findOneAndDelete(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and delete it.
    `MongoClient` | `findOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and delete it.
    `MongoClient` | `findOneAndReplace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and replace it.
    `MongoClient` | `findOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject replace, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and replace it.
    `MongoClient` | `findOneAndUpdate(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and update it.
    `MongoClient` | `findOneAndUpdateWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and update it.
    `MongoClient` | `findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler)` Find matching documents in the specified collection, specifying options
    `MongoClient` | `getCollections(Handler<AsyncResult<List<String>>> resultHandler)` Get a list of all collections in the database.
    `MongoClient` | `getDelegate()`
    `int` | `hashCode()`
    `MongoClient` | `insert(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)` Insert a document in the specified collection
    `MongoClient` | `insertWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)` Insert a document in the specified collection with the specified write option
    `MongoClient` | `listIndexes(String collection, Handler<AsyncResult<JsonArray>> resultHandler)` Get all the indexes in this collection.
    `static MongoClient` | `newInstance(MongoClient arg)`
    `MongoClient` | `remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `removeDocument(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)` Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
    `MongoClient` | `removeDocuments(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)` Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
    `MongoClient` | `removeDocumentsWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)` Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
    `MongoClient` | `removeDocumentWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)` Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
    `MongoClient` | `removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `removeOneWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `removeWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `replace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `replaceDocuments(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)` Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
    `MongoClient` | `replaceDocumentsWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)` Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
    `MongoClient` | `replaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler)` 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<Long>` | `rxCount(String collection, JsonObject query)` Count matching documents in a collection.
    `Completable` | `rxCreateCollection(String collectionName)` Create a new collection
    `Completable` | `rxCreateIndex(String collection, JsonObject key)` Creates an index.
    `Completable` | `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>` | `rxDistinctWithQuery(String collection, String fieldName, String resultClassname, JsonObject query)` Gets the distinct values of the specified field name filtered by specified query.
    `Completable` | `rxDropCollection(String collection)` Drop a collection
    `Completable` | `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.
    `Completable` | `rxRemove(String collection, JsonObject query)` Deprecated.
    `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
    `Completable` | `rxRemoveOne(String collection, JsonObject query)` Deprecated.
    `Completable` | `rxRemoveOneWithOptions(String collection, JsonObject query, WriteOption writeOption)` Deprecated.
    `Completable` | `rxRemoveWithOptions(String collection, JsonObject query, WriteOption writeOption)` Deprecated.
    `Completable` | `rxReplace(String collection, JsonObject query, JsonObject replace)` Deprecated.
    `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
    `Completable` | `rxReplaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options)` Deprecated.
    `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
    `Completable` | `rxUpdate(String collection, JsonObject query, JsonObject update)` Deprecated.
    `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, JsonObject update, UpdateOptions options)` Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
    `Completable` | `rxUpdateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options)` Deprecated.
    `MongoClient` | `save(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)` Save a document in the specified collection
    `MongoClient` | `saveWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)` Save a document in the specified collection with the specified write option
    `String` | `toString()`
    `MongoClient` | `update(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoClient` | `updateCollection(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)` Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
    `MongoClient` | `updateCollectionWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)` Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
    `MongoClient` | `updateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)` Deprecated.

    - ### 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)

  - ### 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()

    - #### createNonShared

          public static MongoClient createNonShared(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.reactivex.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 MongoClient save(String collection,
                                  JsonObject document,
                                  Handler<AsyncResult<String>> resultHandler)

      Save a document in the specified collection

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
        `resultHandler` - result handler will be provided with the id if document didn't already have one
      Returns:

    - #### 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:

    - #### saveWithOptions

          public MongoClient saveWithOptions(String collection,
                                             JsonObject document,
                                             WriteOption writeOption,
                                             Handler<AsyncResult<String>> resultHandler)

      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
        `resultHandler` - result handler will be provided with the id if document didn't already have one
      Returns:

    - #### 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:

    - #### insert

          public MongoClient insert(String collection,
                                    JsonObject document,
                                    Handler<AsyncResult<String>> resultHandler)

      Insert a document in the specified collection

      This operation might change _id field of document parameter

      Parameters:
        `collection` - the collection
        `document` - the document
        `resultHandler` - result handler will be provided with the id if document didn't already have one
      Returns:

    - #### 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:

    - #### insertWithOptions

          public MongoClient insertWithOptions(String collection,
                                               JsonObject document,
                                               WriteOption writeOption,
                                               Handler<AsyncResult<String>> resultHandler)

      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
        `resultHandler` - result handler will be provided with the id if document didn't already have one
      Returns:

    - #### 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:

    - #### update

          @Deprecated
          public MongoClient update(String collection,
                                                JsonObject query,
                                                JsonObject update,
                                                Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Update matching documents in the specified collection
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
        `resultHandler` - will be called when complete
      Returns:

    - #### rxUpdate

          @Deprecated
          public Completable rxUpdate(String collection,
                                                  JsonObject query,
                                                  JsonObject update)

      Deprecated.
      Update matching documents in the specified collection
      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `update` - used to describe how the documents will be updated
      Returns:

    - #### updateCollection

          public MongoClient updateCollection(String collection,
                                              JsonObject query,
                                              JsonObject update,
                                              Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### updateWithOptions

          @Deprecated
          public MongoClient updateWithOptions(String collection,
                                                           JsonObject query,
                                                           JsonObject update,
                                                           UpdateOptions options,
                                                           Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Update matching documents in the specified collection, specifying options
      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
        `resultHandler` - will be called when complete
      Returns:

    - #### rxUpdateWithOptions

          @Deprecated
          public Completable rxUpdateWithOptions(String collection,
                                                             JsonObject query,
                                                             JsonObject update,
                                                             UpdateOptions options)

      Deprecated.
      Update matching documents in the specified collection, specifying options
      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:

    - #### updateCollectionWithOptions

          public MongoClient updateCollectionWithOptions(String collection,
                                                         JsonObject query,
                                                         JsonObject update,
                                                         UpdateOptions options,
                                                         Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### replace

          @Deprecated
          public MongoClient replace(String collection,
                                                 JsonObject query,
                                                 JsonObject replace,
                                                 Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Replace matching documents in the specified collection

      This operation might change _id field of replace parameter

      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `replace` - all matching documents will be replaced with this
        `resultHandler` - will be called when complete
      Returns:

    - #### rxReplace

          @Deprecated
          public Completable rxReplace(String collection,
                                                   JsonObject query,
                                                   JsonObject replace)

      Deprecated.
      Replace matching documents in the specified collection

      This operation might change _id field of replace parameter

      Parameters:
        `collection` - the collection
        `query` - query used to match the documents
        `replace` - all matching documents will be replaced with this
      Returns:

    - #### replaceDocuments

          public MongoClient replaceDocuments(String collection,
                                              JsonObject query,
                                              JsonObject replace,
                                              Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### replaceWithOptions

          @Deprecated
          public MongoClient replaceWithOptions(String collection,
                                                            JsonObject query,
                                                            JsonObject replace,
                                                            UpdateOptions options,
                                                            Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Replace matching documents in the specified collection, specifying options

      This operation might change _id field of replace parameter

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### rxReplaceWithOptions

          @Deprecated
          public Completable rxReplaceWithOptions(String collection,
                                                              JsonObject query,
                                                              JsonObject replace,
                                                              UpdateOptions options)

      Deprecated.
      Replace matching documents in the specified collection, specifying options

      This operation might change _id field of replace parameter

      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:

    - #### replaceDocumentsWithOptions

          public MongoClient replaceDocumentsWithOptions(String collection,
                                                         JsonObject query,
                                                         JsonObject replace,
                                                         UpdateOptions options,
                                                         Handler<AsyncResult<MongoClientUpdateResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### bulkWrite

          public MongoClient bulkWrite(String collection,
                                       List<BulkOperation> operations,
                                       Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)

      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
        `resultHandler` - will be called with a `MongoClientBulkWriteResult` when complete
      Returns:

    - #### 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:

    - #### bulkWriteWithOptions

          public MongoClient bulkWriteWithOptions(String collection,
                                                  List<BulkOperation> operations,
                                                  BulkWriteOptions bulkWriteOptions,
                                                  Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)

      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
        `resultHandler` - will be called with a `MongoClientBulkWriteResult` when complete
      Returns:

    - #### 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:

    - #### find

          public MongoClient find(String collection,
                                  JsonObject query,
                                  Handler<AsyncResult<List<JsonObject>>> resultHandler)

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

    - #### 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:

    - #### 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 MongoClient findWithOptions(String collection,
                                             JsonObject query,
                                             FindOptions options,
                                             Handler<AsyncResult<List<JsonObject>>> resultHandler)

      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
        `resultHandler` - will be provided with list of documents
      Returns:

    - #### 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:

    - #### 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 MongoClient findOne(String collection,
                                     JsonObject query,
                                     JsonObject fields,
                                     Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the document, if any
      Returns:

    - #### 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:

    - #### findOneAndUpdate

          public MongoClient findOneAndUpdate(String collection,
                                              JsonObject query,
                                              JsonObject update,
                                              Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the document, if any
      Returns:

    - #### 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:

    - #### findOneAndUpdateWithOptions

          public MongoClient findOneAndUpdateWithOptions(String collection,
                                                         JsonObject query,
                                                         JsonObject update,
                                                         FindOptions findOptions,
                                                         UpdateOptions updateOptions,
                                                         Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the document, if any
      Returns:

    - #### 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:

    - #### findOneAndReplace

          public MongoClient findOneAndReplace(String collection,
                                               JsonObject query,
                                               JsonObject replace,
                                               Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the document, if any
      Returns:

    - #### 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:

    - #### findOneAndReplaceWithOptions

          public MongoClient findOneAndReplaceWithOptions(String collection,
                                                          JsonObject query,
                                                          JsonObject replace,
                                                          FindOptions findOptions,
                                                          UpdateOptions updateOptions,
                                                          Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the document, if any
      Returns:

    - #### 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:

    - #### findOneAndDelete

          public MongoClient findOneAndDelete(String collection,
                                              JsonObject query,
                                              Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the deleted document, if any
      Returns:

    - #### 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:

    - #### findOneAndDeleteWithOptions

          public MongoClient findOneAndDeleteWithOptions(String collection,
                                                         JsonObject query,
                                                         FindOptions findOptions,
                                                         Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with the deleted document, if any
      Returns:

    - #### 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:

    - #### count

          public MongoClient count(String collection,
                                   JsonObject query,
                                   Handler<AsyncResult<Long>> resultHandler)

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

    - #### 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:

    - #### remove

          @Deprecated
          public MongoClient remove(String collection,
                                                JsonObject query,
                                                Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Remove matching documents from a collection
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `resultHandler` - will be called when complete
      Returns:

    - #### rxRemove

          @Deprecated
          public Completable rxRemove(String collection,
                                                  JsonObject query)

      Deprecated.
      Remove matching documents from a collection
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:

    - #### removeDocuments

          public MongoClient removeDocuments(String collection,
                                             JsonObject query,
                                             Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)

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

    - #### 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:

    - #### removeWithOptions

          @Deprecated
          public MongoClient removeWithOptions(String collection,
                                                           JsonObject query,
                                                           WriteOption writeOption,
                                                           Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Remove matching documents from a collection with the specified write option
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `writeOption` - the write option to use
        `resultHandler` - will be called when complete
      Returns:

    - #### rxRemoveWithOptions

          @Deprecated
          public Completable rxRemoveWithOptions(String collection,
                                                             JsonObject query,
                                                             WriteOption writeOption)

      Deprecated.
      Remove matching documents from a collection with the specified write option
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `writeOption` - the write option to use
      Returns:

    - #### removeDocumentsWithOptions

          public MongoClient removeDocumentsWithOptions(String collection,
                                                        JsonObject query,
                                                        WriteOption writeOption,
                                                        Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### removeOne

          @Deprecated
          public MongoClient removeOne(String collection,
                                                   JsonObject query,
                                                   Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Remove a single matching document from a collection
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `resultHandler` - will be called when complete
      Returns:

    - #### rxRemoveOne

          @Deprecated
          public Completable rxRemoveOne(String collection,
                                                     JsonObject query)

      Deprecated.
      Remove a single matching document from a collection
      Parameters:
        `collection` - the collection
        `query` - query used to match document
      Returns:

    - #### removeDocument

          public MongoClient removeDocument(String collection,
                                            JsonObject query,
                                            Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### removeOneWithOptions

          @Deprecated
          public MongoClient removeOneWithOptions(String collection,
                                                              JsonObject query,
                                                              WriteOption writeOption,
                                                              Handler<AsyncResult<Void>> resultHandler)

      Deprecated.
      Remove a single matching document from a collection with the specified write option
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `writeOption` - the write option to use
        `resultHandler` - will be called when complete
      Returns:

    - #### rxRemoveOneWithOptions

          @Deprecated
          public Completable rxRemoveOneWithOptions(String collection,
                                                                JsonObject query,
                                                                WriteOption writeOption)

      Deprecated.
      Remove a single matching document from a collection with the specified write option
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `writeOption` - the write option to use
      Returns:

    - #### removeDocumentWithOptions

          public MongoClient removeDocumentWithOptions(String collection,
                                                       JsonObject query,
                                                       WriteOption writeOption,
                                                       Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### 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:

    - #### createCollection

          public MongoClient createCollection(String collectionName,
                                              Handler<AsyncResult<Void>> resultHandler)

      Create a new collection
      Parameters:
        `collectionName` - the name of the collection
        `resultHandler` - will be called when complete
      Returns:

    - #### rxCreateCollection

          public Completable rxCreateCollection(String collectionName)

      Create a new collection
      Parameters:
        `collectionName` - the name of the collection
      Returns:

    - #### getCollections

          public MongoClient getCollections(Handler<AsyncResult<List<String>>> resultHandler)

      Get a list of all collections in the database.
      Parameters:
        `resultHandler` - will be called with a list of collections.
      Returns:

    - #### rxGetCollections

          public Single<List<String>> rxGetCollections()

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

    - #### dropCollection

          public MongoClient dropCollection(String collection,
                                            Handler<AsyncResult<Void>> resultHandler)

      Drop a collection
      Parameters:
        `collection` - the collection
        `resultHandler` - will be called when complete
      Returns:

    - #### rxDropCollection

          public Completable rxDropCollection(String collection)

      Drop a collection
      Parameters:
        `collection` - the collection
      Returns:

    - #### createIndex

          public MongoClient createIndex(String collection,
                                         JsonObject key,
                                         Handler<AsyncResult<Void>> resultHandler)

      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.
        `resultHandler` - will be called when complete
      Returns:

    - #### rxCreateIndex

          public Completable 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:

    - #### createIndexWithOptions

          public MongoClient createIndexWithOptions(String collection,
                                                    JsonObject key,
                                                    IndexOptions options,
                                                    Handler<AsyncResult<Void>> resultHandler)

      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
        `resultHandler` - will be called when complete
      Returns:

    - #### rxCreateIndexWithOptions

          public Completable 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:

    - #### listIndexes

          public MongoClient listIndexes(String collection,
                                         Handler<AsyncResult<JsonArray>> resultHandler)

      Get all the indexes in this collection.
      Parameters:
        `collection` - the collection
        `resultHandler` - will be called when complete
      Returns:

    - #### rxListIndexes

          public Single<JsonArray> rxListIndexes(String collection)

      Get all the indexes in this collection.
      Parameters:
        `collection` - the collection
      Returns:

    - #### dropIndex

          public MongoClient dropIndex(String collection,
                                       String indexName,
                                       Handler<AsyncResult<Void>> resultHandler)

      Drops the index given its name.
      Parameters:
        `collection` - the collection
        `indexName` - the name of the index to remove
        `resultHandler` - will be called when complete
      Returns:

    - #### rxDropIndex

          public Completable rxDropIndex(String collection,
                                         String indexName)

      Drops the index given its name.
      Parameters:
        `collection` - the collection
        `indexName` - the name of the index to remove
      Returns:

    - #### runCommand

          public MongoClient runCommand(String commandName,
                                        JsonObject command,
                                        Handler<AsyncResult<JsonObject>> resultHandler)

      Run an arbitrary MongoDB command.
      Parameters:
        `commandName` - the name of the command
        `command` - the command
        `resultHandler` - will be called with the result.
      Returns:

    - #### 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:

    - #### distinct

          public MongoClient distinct(String collection,
                                      String fieldName,
                                      String resultClassname,
                                      Handler<AsyncResult<JsonArray>> resultHandler)

      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` -
        `resultHandler` - will be provided with array of values.
      Returns:

    - #### 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:

    - #### distinctWithQuery

          public MongoClient distinctWithQuery(String collection,
                                               String fieldName,
                                               String resultClassname,
                                               JsonObject query,
                                               Handler<AsyncResult<JsonArray>> resultHandler)

      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
        `resultHandler` - will be provided with array of values.
      Returns:

    - #### 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:

    - #### 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

    - #### 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,
                                                               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

    - #### 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:

    - #### close

          public void close()

      Close the client and release its resources

    - #### newInstance

          public static MongoClient newInstance(MongoClient arg)

Copyright © 2018 Eclipse. All rights reserved.