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.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MongoClient(MongoClient delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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.
    `Observable<Long>` | `countObservable(String collection, JsonObject query)` Count matching documents in a collection.
    `MongoClient` | `createCollection(String collectionName, Handler<AsyncResult<Void>> resultHandler)` Create a new collection
    `Observable<Void>` | `createCollectionObservable(String collectionName)` Create a new collection
    `MongoClient` | `createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler)` Creates an index.
    `Observable<Void>` | `createIndexObservable(String collection, JsonObject key)` Creates an index.
    `MongoClient` | `createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler)` Creates an index.
    `Observable<Void>` | `createIndexWithOptionsObservable(String collection, JsonObject key, IndexOptions options)` 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.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
    `MongoClient` | `distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler)` Gets the distinct values of the specified field name.
    `MongoClient` | `distinctBatch(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonObject>> resultHandler)` Gets the distinct values of the specified field name.
    `Observable<JsonObject>` | `distinctBatchObservable(String collection, String fieldName, String resultClassname)` Gets the distinct values of the specified field name.
    `Observable<JsonArray>` | `distinctObservable(String collection, String fieldName, String resultClassname)` Gets the distinct values of the specified field name.
    `MongoClient` | `dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler)` Drop a collection
    `Observable<Void>` | `dropCollectionObservable(String collection)` Drop a collection
    `MongoClient` | `dropIndex(String collection, String indexName, Handler<AsyncResult<Void>> resultHandler)` Drops the index given its name.
    `Observable<Void>` | `dropIndexObservable(String collection, String indexName)` Drops the index given its name.
    `MongoClient` | `find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler)` Find matching documents in the specified collection
    `MongoClient` | `findBatch(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler)` Find matching documents in the specified collection.
    `Observable<JsonObject>` | `findBatchObservable(String collection, JsonObject query)` Find matching documents in the specified collection.
    `MongoClient` | `findBatchWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<JsonObject>> resultHandler)` Find matching documents in the specified collection, specifying options.
    `Observable<JsonObject>` | `findBatchWithOptionsObservable(String collection, JsonObject query, FindOptions options)` Find matching documents in the specified collection, specifying options.
    `Observable<List<JsonObject>>` | `findObservable(String collection, JsonObject query)` Find matching documents in the specified collection
    `MongoClient` | `findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection
    `Observable<JsonObject>` | `findOneObservable(String collection, JsonObject query, JsonObject fields)` Find a single matching document in the specified collection
    `MongoClient` | `findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler)` Find matching documents in the specified collection, specifying options
    `Observable<List<JsonObject>>` | `findWithOptionsObservable(String collection, JsonObject query, FindOptions options)` 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.
    `Observable<List<String>>` | `getCollectionsObservable()` Get a list of all collections in the database.
    `Object` | `getDelegate()`
    `MongoClient` | `insert(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)` Insert a document in the specified collection
    `Observable<String>` | `insertObservable(String collection, JsonObject document)` 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
    `Observable<String>` | `insertWithOptionsObservable(String collection, JsonObject document, WriteOption writeOption)` 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.
    `Observable<JsonArray>` | `listIndexesObservable(String collection)` Get all the indexes in this collection.
    `static MongoClient` | `newInstance(MongoClient arg)`
    `MongoClient` | `remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)` Remove matching documents from a collection
    `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
    `Observable<MongoClientDeleteResult>` | `removeDocumentObservable(String collection, JsonObject query)` 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
    `Observable<MongoClientDeleteResult>` | `removeDocumentsObservable(String collection, JsonObject query)` 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
    `Observable<MongoClientDeleteResult>` | `removeDocumentsWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)` 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
    `Observable<MongoClientDeleteResult>` | `removeDocumentWithOptionsObservable(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
    `Observable<Void>` | `removeObservable(String collection, JsonObject query)` Remove matching documents from a collection
    `MongoClient` | `removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)` Remove a single matching document from a collection
    `Observable<Void>` | `removeOneObservable(String collection, JsonObject query)` Remove a single matching document from a collection
    `MongoClient` | `removeOneWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)` Remove a single matching document from a collection with the specified write option
    `Observable<Void>` | `removeOneWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)` Remove a single matching document from a collection with the specified write option
    `MongoClient` | `removeWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)` Remove matching documents from a collection with the specified write option
    `Observable<Void>` | `removeWithOptionsObservable(String collection, JsonObject query, WriteOption writeOption)` Remove matching documents from a collection with the specified write option
    `MongoClient` | `replace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<Void>> resultHandler)` Replace matching documents in the specified collection
    `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
    `Observable<MongoClientUpdateResult>` | `replaceDocumentsObservable(String collection, JsonObject query, JsonObject replace)` 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
    `Observable<MongoClientUpdateResult>` | `replaceDocumentsWithOptionsObservable(String collection, JsonObject query, JsonObject replace, UpdateOptions options)` Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
    `Observable<Void>` | `replaceObservable(String collection, JsonObject query, JsonObject replace)` Replace matching documents in the specified collection
    `MongoClient` | `replaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)` Replace matching documents in the specified collection, specifying options
    `Observable<Void>` | `replaceWithOptionsObservable(String collection, JsonObject query, JsonObject replace, UpdateOptions options)` Replace matching documents in the specified collection, specifying options
    `MongoClient` | `runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler)` Run an arbitrary MongoDB command.
    `Observable<JsonObject>` | `runCommandObservable(String commandName, JsonObject command)` Run an arbitrary MongoDB command.
    `MongoClient` | `save(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)` Save a document in the specified collection
    `Observable<String>` | `saveObservable(String collection, JsonObject document)` 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
    `Observable<String>` | `saveWithOptionsObservable(String collection, JsonObject document, WriteOption writeOption)` Save a document in the specified collection with the specified write option
    `MongoClient` | `update(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<Void>> resultHandler)` Update matching documents in the specified collection
    `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
    `Observable<MongoClientUpdateResult>` | `updateCollectionObservable(String collection, JsonObject query, JsonObject update)` 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
    `Observable<MongoClientUpdateResult>` | `updateCollectionWithOptionsObservable(String collection, JsonObject query, JsonObject update, UpdateOptions options)` Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
    `Observable<Void>` | `updateObservable(String collection, JsonObject query, JsonObject update)` Update matching documents in the specified collection
    `MongoClient` | `updateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)` Update matching documents in the specified collection, specifying options
    `Observable<Void>` | `updateWithOptionsObservable(String collection, JsonObject query, JsonObject update, UpdateOptions options)` Update matching documents in the specified collection, specifying options

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### MongoClient

          public MongoClient(MongoClient delegate)

  - ### Method Detail

    - #### getDelegate

          public Object 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.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 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:

    - #### saveObservable

          public Observable<String> saveObservable(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:

    - #### saveWithOptionsObservable

          public Observable<String> saveWithOptionsObservable(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:

    - #### insertObservable

          public Observable<String> insertObservable(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:

    - #### insertWithOptionsObservable

          public Observable<String> insertWithOptionsObservable(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

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

      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:

    - #### updateObservable

          public Observable<Void> updateObservable(String collection,
                                                   JsonObject query,
                                                   JsonObject update)

      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:

    - #### updateCollectionObservable

          public Observable<MongoClientUpdateResult> updateCollectionObservable(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

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

      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:

    - #### updateWithOptionsObservable

          public Observable<Void> updateWithOptionsObservable(String collection,
                                                              JsonObject query,
                                                              JsonObject update,
                                                              UpdateOptions options)

      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:

    - #### updateCollectionWithOptionsObservable

          public Observable<MongoClientUpdateResult> updateCollectionWithOptionsObservable(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

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

      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:

    - #### replaceObservable

          public Observable<Void> replaceObservable(String collection,
                                                    JsonObject query,
                                                    JsonObject replace)

      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:

    - #### replaceDocumentsObservable

          public Observable<MongoClientUpdateResult> replaceDocumentsObservable(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

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

      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:

    - #### replaceWithOptionsObservable

          public Observable<Void> replaceWithOptionsObservable(String collection,
                                                               JsonObject query,
                                                               JsonObject replace,
                                                               UpdateOptions options)

      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:

    - #### replaceDocumentsWithOptionsObservable

          public Observable<MongoClientUpdateResult> replaceDocumentsWithOptionsObservable(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:

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

    - #### findObservable

          public Observable<List<JsonObject>> findObservable(String collection,
                                                             JsonObject query)

      Find matching documents in the specified collection
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:

    - #### findBatch

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

      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
        `resultHandler` - will be provided with each found document
      Returns:

    - #### findBatchObservable

          public Observable<JsonObject> findBatchObservable(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:

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

    - #### findWithOptionsObservable

          public Observable<List<JsonObject>> findWithOptionsObservable(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 MongoClient findBatchWithOptions(String collection,
                                                  JsonObject query,
                                                  FindOptions options,
                                                  Handler<AsyncResult<JsonObject>> resultHandler)

      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
        `resultHandler` - will be provided with each found document
      Returns:

    - #### findBatchWithOptionsObservable

          public Observable<JsonObject> findBatchWithOptionsObservable(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:

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

    - #### findOneObservable

          public Observable<JsonObject> findOneObservable(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:

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

    - #### countObservable

          public Observable<Long> countObservable(String collection,
                                                  JsonObject query)

      Count matching documents in a collection.
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:

    - #### remove

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

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

    - #### removeObservable

          public Observable<Void> removeObservable(String collection,
                                                   JsonObject query)

      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:

    - #### removeDocumentsObservable

          public Observable<MongoClientDeleteResult> removeDocumentsObservable(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

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

      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:

    - #### removeWithOptionsObservable

          public Observable<Void> removeWithOptionsObservable(String collection,
                                                              JsonObject query,
                                                              WriteOption writeOption)

      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:

    - #### removeDocumentsWithOptionsObservable

          public Observable<MongoClientDeleteResult> removeDocumentsWithOptionsObservable(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

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

      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:

    - #### removeOneObservable

          public Observable<Void> removeOneObservable(String collection,
                                                      JsonObject query)

      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:

    - #### removeDocumentObservable

          public Observable<MongoClientDeleteResult> removeDocumentObservable(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

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

      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:

    - #### removeOneWithOptionsObservable

          public Observable<Void> removeOneWithOptionsObservable(String collection,
                                                                 JsonObject query,
                                                                 WriteOption writeOption)

      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:

    - #### removeDocumentWithOptionsObservable

          public Observable<MongoClientDeleteResult> removeDocumentWithOptionsObservable(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:

    - #### createCollectionObservable

          public Observable<Void> createCollectionObservable(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:

    - #### getCollectionsObservable

          public Observable<List<String>> getCollectionsObservable()

      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:

    - #### dropCollectionObservable

          public Observable<Void> dropCollectionObservable(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:

    - #### createIndexObservable

          public Observable<Void> createIndexObservable(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:

    - #### createIndexWithOptionsObservable

          public Observable<Void> createIndexWithOptionsObservable(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:

    - #### listIndexesObservable

          public Observable<JsonArray> listIndexesObservable(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:

    - #### dropIndexObservable

          public Observable<Void> dropIndexObservable(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:

    - #### runCommandObservable

          public Observable<JsonObject> runCommandObservable(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:

    - #### distinctObservable

          public Observable<JsonArray> distinctObservable(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:

    - #### distinctBatch

          public MongoClient distinctBatch(String collection,
                                           String fieldName,
                                           String resultClassname,
                                           Handler<AsyncResult<JsonObject>> resultHandler)

      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` -
        `resultHandler` - will be provided with each found value
      Returns:

    - #### distinctBatchObservable

          public Observable<JsonObject> distinctBatchObservable(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:

    - #### close

          public void close()

      Close the client and release its resources

    - #### newInstance

          public static MongoClient newInstance(MongoClient arg)

Copyright © 2016. All rights reserved.