io.vertx.ext.mongo

## Interface MongoService

- All Superinterfaces:
    MongoClient

      public interface MongoService
      extends MongoClient

  Author:
    Tim Fox

- - ### Field Summary

    - ### Fields inherited from interface io.vertx.ext.mongo.MongoClient

      `DEFAULT_DB_NAME, DEFAULT_POOL_NAME`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `default ReadStream<JsonObject>` | `aggregate(String collection, JsonArray pipeline)` Run aggregate MongoDB command with default `AggregateOptions`.
    `default ReadStream<JsonObject>` | `aggregateWithOptions(String collection, JsonArray pipeline, AggregateOptions options)` Run aggregate MongoDB command.
    `MongoService` | `bulkWrite(String collection, List<BulkOperation> operations, Handler<AsyncResult<MongoClientBulkWriteResult>> resultHandler)` Execute a bulk operation.
    `MongoService` | `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
    `MongoService` | `count(String collection, JsonObject query, Handler<AsyncResult<Long>> resultHandler)` Count matching documents in a collection.
    `MongoService` | `createCollection(String collectionName, Handler<AsyncResult<Void>> resultHandler)` Create a new collection
    `static MongoService` | `createEventBusProxy(Vertx vertx, String address)` Create a proxy to a service that is deployed somewhere on the event bus
    `MongoService` | `createIndex(String collection, JsonObject key, Handler<AsyncResult<Void>> resultHandler)` Creates an index.
    `MongoService` | `createIndexWithOptions(String collection, JsonObject key, IndexOptions options, Handler<AsyncResult<Void>> resultHandler)` Creates an index.
    `MongoService` | `distinct(String collection, String fieldName, String resultClassname, Handler<AsyncResult<JsonArray>> resultHandler)` Gets the distinct values of the specified field name.
    `default ReadStream<JsonObject>` | `distinctBatch(String collection, String fieldName, String resultClassname)` Gets the distinct values of the specified field name.
    `default ReadStream<JsonObject>` | `distinctBatchWithQuery(String collection, String fieldName, String resultClassname, JsonObject query)` Gets the distinct values of the specified field name filtered by specified query.
    `default 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.
    `MongoService` | `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.
    `MongoService` | `dropCollection(String collection, Handler<AsyncResult<Void>> resultHandler)` Drop a collection
    `MongoService` | `dropIndex(String collection, String indexName, Handler<AsyncResult<Void>> resultHandler)` Drops the index given its name.
    `MongoService` | `find(String collection, JsonObject query, Handler<AsyncResult<List<JsonObject>>> resultHandler)` Find matching documents in the specified collection
    `default ReadStream<JsonObject>` | `findBatch(String collection, JsonObject query)` Find matching documents in the specified collection.
    `default ReadStream<JsonObject>` | `findBatchWithOptions(String collection, JsonObject query, FindOptions options)` Find matching documents in the specified collection, specifying options.
    `MongoService` | `findOne(String collection, JsonObject query, JsonObject fields, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection
    `MongoService` | `findOneAndDelete(String collection, JsonObject query, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and delete it.
    `MongoService` | `findOneAndDeleteWithOptions(String collection, JsonObject query, FindOptions findOptions, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and delete it.
    `MongoService` | `findOneAndReplace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and replace it.
    `MongoService` | `findOneAndReplaceWithOptions(String collection, JsonObject query, JsonObject update, FindOptions findOptions, UpdateOptions updateOptions, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and replace it.
    `MongoService` | `findOneAndUpdate(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<JsonObject>> resultHandler)` Find a single matching document in the specified collection and update it.
    `MongoService` | `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.
    `MongoService` | `findWithOptions(String collection, JsonObject query, FindOptions options, Handler<AsyncResult<List<JsonObject>>> resultHandler)` Find matching documents in the specified collection, specifying options
    `MongoService` | `getCollections(Handler<AsyncResult<List<String>>> resultHandler)` Get a list of all collections in the database.
    `MongoService` | `insert(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)` Insert a document in the specified collection
    `MongoService` | `insertWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)` Insert a document in the specified collection with the specified write option
    `MongoService` | `listIndexes(String collection, Handler<AsyncResult<JsonArray>> resultHandler)` Get all the indexes in this collection.
    `MongoService` | `remove(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `removeDocument(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)` Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
    `MongoService` | `removeDocuments(String collection, JsonObject query, Handler<AsyncResult<MongoClientDeleteResult>> resultHandler)` Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
    `MongoService` | `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
    `MongoService` | `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
    `MongoService` | `removeOne(String collection, JsonObject query, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `removeOneWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `removeWithOptions(String collection, JsonObject query, WriteOption writeOption, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `replace(String collection, JsonObject query, JsonObject replace, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `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
    `MongoService` | `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
    `MongoService` | `replaceWithOptions(String collection, JsonObject query, JsonObject replace, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `runCommand(String commandName, JsonObject command, Handler<AsyncResult<JsonObject>> resultHandler)` Run an arbitrary MongoDB command.
    `MongoService` | `save(String collection, JsonObject document, Handler<AsyncResult<String>> resultHandler)` Save a document in the specified collection
    `MongoService` | `saveWithOptions(String collection, JsonObject document, WriteOption writeOption, Handler<AsyncResult<String>> resultHandler)` Save a document in the specified collection with the specified write option
    `MongoService` | `update(String collection, JsonObject query, JsonObject update, Handler<AsyncResult<Void>> resultHandler)` Deprecated.
    `MongoService` | `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
    `MongoService` | `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
    `MongoService` | `updateWithOptions(String collection, JsonObject query, JsonObject update, UpdateOptions options, Handler<AsyncResult<Void>> resultHandler)` Deprecated.

    - ### Methods inherited from interface io.vertx.ext.mongo.MongoClient

      `create, createNonShared, createShared, createShared`

- - ### Method Detail

    - #### createEventBusProxy

          static MongoService createEventBusProxy(Vertx vertx,
                                                  String address)

      Create a proxy to a service that is deployed somewhere on the event bus
      Parameters:
        `vertx` - the Vert.x instance
        `address` - the address the service is listening on on the event bus
      Returns:
        the service

    - #### save

          MongoService save(String collection,
                            JsonObject document,
                            Handler<AsyncResult<String>> resultHandler)

      Description copied from interface: `MongoClient`
      Save a document in the specified collection

      This operation might change _id field of document parameter

      Specified by:
        `save` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `document` - the document
        `resultHandler` - result handler will be provided with the id if document didn't already have one

    - #### saveWithOptions

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

      Description copied from interface: `MongoClient`
      Save a document in the specified collection with the specified write option

      This operation might change _id field of document parameter

      Specified by:
        `saveWithOptions` in interface `MongoClient`
      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

    - #### insert

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

      Description copied from interface: `MongoClient`
      Insert a document in the specified collection

      This operation might change _id field of document parameter

      Specified by:
        `insert` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `document` - the document
        `resultHandler` - result handler will be provided with the id if document didn't already have one

    - #### insertWithOptions

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

      Description copied from interface: `MongoClient`
      Insert a document in the specified collection with the specified write option

      This operation might change _id field of document parameter

      Specified by:
        `insertWithOptions` in interface `MongoClient`
      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

    - #### update

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Update matching documents in the specified collection
      Specified by:
        `update` in interface `MongoClient`
      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

    - #### updateCollection

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

      Description copied from interface: `MongoClient`
      Update matching documents in the specified collection and return the handler with MongoClientUpdateResult result
      Specified by:
        `updateCollection` in interface `MongoClient`
      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

    - #### updateWithOptions

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Update matching documents in the specified collection, specifying options
      Specified by:
        `updateWithOptions` in interface `MongoClient`
      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

    - #### updateCollectionWithOptions

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

      Description copied from interface: `MongoClient`
      Update matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
      Specified by:
        `updateCollectionWithOptions` in interface `MongoClient`
      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

    - #### replace

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Replace matching documents in the specified collection

      This operation might change _id field of replace parameter

      Specified by:
        `replace` in interface `MongoClient`
      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

    - #### replaceDocuments

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

      Description copied from interface: `MongoClient`
      Replace matching documents in the specified collection and return the handler with MongoClientUpdateResult result
      Specified by:
        `replaceDocuments` in interface `MongoClient`
      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

    - #### replaceWithOptions

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Replace matching documents in the specified collection, specifying options

      This operation might change _id field of replace parameter

      Specified by:
        `replaceWithOptions` in interface `MongoClient`
      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

    - #### replaceDocumentsWithOptions

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

      Description copied from interface: `MongoClient`
      Replace matching documents in the specified collection, specifying options and return the handler with MongoClientUpdateResult result
      Specified by:
        `replaceDocumentsWithOptions` in interface `MongoClient`
      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

    - #### bulkWrite

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

      Description copied from interface: `MongoClient`
      Execute a bulk operation. Can insert, update, replace, and/or delete multiple documents with one request.
      Specified by:
        `bulkWrite` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `operations` - the operations to execute
        `resultHandler` - will be called with a `MongoClientBulkWriteResult` when complete

    - #### bulkWriteWithOptions

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

      Description copied from interface: `MongoClient`
      Execute a bulk operation with the specified write options. Can insert, update, replace, and/or delete multiple documents with one request.
      Specified by:
        `bulkWriteWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `operations` - the operations to execute
        `bulkWriteOptions` - the write options
        `resultHandler` - will be called with a `MongoClientBulkWriteResult` when complete

    - #### find

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

      Description copied from interface: `MongoClient`
      Find matching documents in the specified collection
      Specified by:
        `find` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `resultHandler` - will be provided with list of documents

    - #### findBatch

          default ReadStream<JsonObject> findBatch(String collection,
                                                   JsonObject query)

      Description copied from interface: `MongoClient`
      Find matching documents in the specified collection. This method use batchCursor for returning each found document.
      Specified by:
        `findBatch` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
      Returns:
        a `ReadStream` emitting found documents

    - #### findWithOptions

          MongoService findWithOptions(String collection,
                                       JsonObject query,
                                       FindOptions options,
                                       Handler<AsyncResult<List<JsonObject>>> resultHandler)

      Description copied from interface: `MongoClient`
      Find matching documents in the specified collection, specifying options
      Specified by:
        `findWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `options` - options to configure the find
        `resultHandler` - will be provided with list of documents

    - #### findBatchWithOptions

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

      Description copied from interface: `MongoClient`
      Find matching documents in the specified collection, specifying options. This method use batchCursor for returning each found document.
      Specified by:
        `findBatchWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `options` - options to configure the find
      Returns:
        a `ReadStream` emitting found documents

    - #### findOne

          MongoService findOne(String collection,
                               JsonObject query,
                               JsonObject fields,
                               Handler<AsyncResult<JsonObject>> resultHandler)

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection

      This operation might change _id field of query parameter

      Specified by:
        `findOne` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `fields` - the fields
        `resultHandler` - will be provided with the document, if any

    - #### findOneAndUpdate

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

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection and update it.

      This operation might change _id field of query parameter

      Specified by:
        `findOneAndUpdate` in interface `MongoClient`
      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

    - #### findOneAndUpdateWithOptions

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

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection and update it.

      This operation might change _id field of query parameter

      Specified by:
        `findOneAndUpdateWithOptions` in interface `MongoClient`
      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

    - #### findOneAndReplace

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

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection and replace it.

      This operation might change _id field of query parameter

      Specified by:
        `findOneAndReplace` in interface `MongoClient`
      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

    - #### findOneAndReplaceWithOptions

          MongoService findOneAndReplaceWithOptions(String collection,
                                                    JsonObject query,
                                                    JsonObject update,
                                                    FindOptions findOptions,
                                                    UpdateOptions updateOptions,
                                                    Handler<AsyncResult<JsonObject>> resultHandler)

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection and replace it.

      This operation might change _id field of query parameter

      Specified by:
        `findOneAndReplaceWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `update` - the replacement document
        `findOptions` - options to configure the find
        `updateOptions` - options to configure the update
        `resultHandler` - will be provided with the document, if any

    - #### findOneAndDelete

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

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection and delete it.

      This operation might change _id field of query parameter

      Specified by:
        `findOneAndDelete` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - the query used to match the document
        `resultHandler` - will be provided with the deleted document, if any

    - #### findOneAndDeleteWithOptions

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

      Description copied from interface: `MongoClient`
      Find a single matching document in the specified collection and delete it.

      This operation might change _id field of query parameter

      Specified by:
        `findOneAndDeleteWithOptions` in interface `MongoClient`
      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

    - #### count

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

      Description copied from interface: `MongoClient`
      Count matching documents in a collection.
      Specified by:
        `count` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `resultHandler` - will be provided with the number of matching documents

    - #### remove

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Remove matching documents from a collection
      Specified by:
        `remove` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `resultHandler` - will be called when complete

    - #### removeDocuments

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

      Description copied from interface: `MongoClient`
      Remove matching documents from a collection and return the handler with MongoClientDeleteResult result
      Specified by:
        `removeDocuments` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `resultHandler` - will be called when complete

    - #### removeWithOptions

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Remove matching documents from a collection with the specified write option
      Specified by:
        `removeWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `writeOption` - the write option to use
        `resultHandler` - will be called when complete

    - #### removeDocumentsWithOptions

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

      Description copied from interface: `MongoClient`
      Remove matching documents from a collection with the specified write option and return the handler with MongoClientDeleteResult result
      Specified by:
        `removeDocumentsWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match documents
        `writeOption` - the write option to use
        `resultHandler` - will be called when complete

    - #### removeOne

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Remove a single matching document from a collection
      Specified by:
        `removeOne` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `resultHandler` - will be called when complete

    - #### removeDocument

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

      Description copied from interface: `MongoClient`
      Remove a single matching document from a collection and return the handler with MongoClientDeleteResult result
      Specified by:
        `removeDocument` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `resultHandler` - will be called when complete

    - #### removeOneWithOptions

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

      Deprecated.
      Description copied from interface: `MongoClient`
      Remove a single matching document from a collection with the specified write option
      Specified by:
        `removeOneWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `writeOption` - the write option to use
        `resultHandler` - will be called when complete

    - #### removeDocumentWithOptions

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

      Description copied from interface: `MongoClient`
      Remove a single matching document from a collection with the specified write option and return the handler with MongoClientDeleteResult result
      Specified by:
        `removeDocumentWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `query` - query used to match document
        `writeOption` - the write option to use
        `resultHandler` - will be called when complete

    - #### createCollection

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

      Description copied from interface: `MongoClient`
      Create a new collection
      Specified by:
        `createCollection` in interface `MongoClient`
      Parameters:
        `collectionName` - the name of the collection
        `resultHandler` - will be called when complete

    - #### getCollections

          MongoService getCollections(Handler<AsyncResult<List<String>>> resultHandler)

      Description copied from interface: `MongoClient`
      Get a list of all collections in the database.
      Specified by:
        `getCollections` in interface `MongoClient`
      Parameters:
        `resultHandler` - will be called with a list of collections.

    - #### dropCollection

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

      Description copied from interface: `MongoClient`
      Drop a collection
      Specified by:
        `dropCollection` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `resultHandler` - will be called when complete

    - #### createIndex

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

      Description copied from interface: `MongoClient`
      Creates an index.
      Specified by:
        `createIndex` in interface `MongoClient`
      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

    - #### createIndexWithOptions

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

      Description copied from interface: `MongoClient`
      Creates an index.
      Specified by:
        `createIndexWithOptions` in interface `MongoClient`
      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

    - #### listIndexes

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

      Description copied from interface: `MongoClient`
      Get all the indexes in this collection.
      Specified by:
        `listIndexes` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `resultHandler` - will be called when complete

    - #### dropIndex

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

      Description copied from interface: `MongoClient`
      Drops the index given its name.
      Specified by:
        `dropIndex` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `indexName` - the name of the index to remove
        `resultHandler` - will be called when complete

    - #### runCommand

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

      Description copied from interface: `MongoClient`
      Run an arbitrary MongoDB command.
      Specified by:
        `runCommand` in interface `MongoClient`
      Parameters:
        `commandName` - the name of the command
        `command` - the command
        `resultHandler` - will be called with the result.

    - #### distinct

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

      Description copied from interface: `MongoClient`
      Gets the distinct values of the specified field name. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Specified by:
        `distinct` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `resultHandler` - will be provided with array of values.

    - #### distinctBatch

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

      Description copied from interface: `MongoClient`
      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}).
      Specified by:
        `distinctBatch` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
      Returns:
        a `ReadStream` emitting json fragments

    - #### distinctWithQuery

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

      Description copied from interface: `MongoClient`
      Gets the distinct values of the specified field name filtered by specified query. Return a JsonArray containing distinct values (eg: [ 1 , 89 ])
      Specified by:
        `distinctWithQuery` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `query` - the query
        `resultHandler` - will be provided with array of values.

    - #### distinctBatchWithQuery

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

      Description copied from interface: `MongoClient`
      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}).
      Specified by:
        `distinctBatchWithQuery` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `query` - the query
      Returns:
        a `ReadStream` emitting json fragments

    - #### distinctBatchWithQuery

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

      Description copied from interface: `MongoClient`
      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}).
      Specified by:
        `distinctBatchWithQuery` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `fieldName` - the field name
        `query` - the query
        `batchSize` - the number of documents to load in a batch
      Returns:
        a `ReadStream` emitting json fragments

    - #### aggregate

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

      Description copied from interface: `MongoClient`
      Run aggregate MongoDB command with default `AggregateOptions`.
      Specified by:
        `aggregate` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `pipeline` - aggregation pipeline to be executed

    - #### aggregateWithOptions

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

      Description copied from interface: `MongoClient`
      Run aggregate MongoDB command.
      Specified by:
        `aggregateWithOptions` in interface `MongoClient`
      Parameters:
        `collection` - the collection
        `pipeline` - aggregation pipeline to be executed
        `options` - options to configure the aggregation command

    - #### close

          void close()

      Description copied from interface: `MongoClient`
      Close the client and release its resources
      Specified by:
        `close` in interface `MongoClient`

Copyright © 2022 Eclipse. All rights reserved.