Java com.mongodb.async.client MongoCollection fields, constructors, methods, implement or subclass

Example usage for Java com.mongodb.async.client MongoCollection fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.mongodb.async.client MongoCollection.

The text is from its open source code.

Method

voidcount(Bson filter, SingleResultCallback callback)
Counts the number of documents in the collection according to the given options.
voidcount(ClientSession clientSession, SingleResultCallback callback)
Counts the number of documents in the collection.
voidcountDocuments(SingleResultCallback callback)
Counts the number of documents in the collection.
voidcreateIndex(Bson key, SingleResultCallback callback)
Creates an index.
voidcreateIndex(Bson key, IndexOptions options, SingleResultCallback callback)
Creates an index.
voidcreateIndex(ClientSession clientSession, Bson key, SingleResultCallback callback)
Creates an index.
voiddeleteMany(Bson filter, SingleResultCallback callback)
Removes all documents from the collection that match the given query filter.
voiddeleteOne(Bson filter, SingleResultCallback callback)
Removes at most one document from the collection that matches the given filter.
DistinctIterabledistinct(String fieldName, Class resultClass)
Gets the distinct values of the specified field name.
voiddrop(SingleResultCallback callback)
Drops this collection from the Database.
voiddropIndex(String indexName, SingleResultCallback callback)
Drops the index given its name.
voiddropIndex(Bson keys, SingleResultCallback callback)
Drops the index given the keys used to create it.
FindIterablefind()
Finds all documents in the collection.
FindIterablefind(Bson filter, Class resultClass)
Finds all documents in the collection.
FindIterablefind(ClientSession clientSession, Class resultClass)
Finds all documents in the collection.
FindIterablefind(ClientSession clientSession, Bson filter)
Finds all documents in the collection.
FindIterablefind(Class resultClass)
Finds all documents in the collection.
FindIterablefind(Bson filter)
Finds all documents in the collection.
FindIterablefind(ClientSession clientSession)
Finds all documents in the collection.
voidfindOneAndDelete(Bson filter, FindOneAndDeleteOptions options, SingleResultCallback callback)
Atomically find a document and remove it.
voidfindOneAndDelete(ClientSession clientSession, Bson filter, SingleResultCallback callback)
Atomically find a document and remove it.
voidfindOneAndReplace(Bson filter, TDocument replacement, FindOneAndReplaceOptions options, SingleResultCallback callback)
Atomically find a document and replace it.
voidfindOneAndReplace(ClientSession clientSession, Bson filter, TDocument replacement, SingleResultCallback callback)
Atomically find a document and replace it.
voidfindOneAndReplace(Bson filter, TDocument replacement, SingleResultCallback callback)
Atomically find a document and replace it.
voidfindOneAndUpdate(Bson filter, Bson update, FindOneAndUpdateOptions options, SingleResultCallback callback)
Atomically find a document and update it.
voidfindOneAndUpdate(ClientSession clientSession, Bson filter, Bson update, SingleResultCallback callback)
Atomically find a document and update it.
voidfindOneAndUpdate(Bson filter, List update, FindOneAndUpdateOptions options, SingleResultCallback callback)
Atomically find a document and update it.
voidfindOneAndUpdate(ClientSession clientSession, Bson filter, List update, SingleResultCallback callback)
Atomically find a document and update it.
voidinsertMany(List documents, SingleResultCallback callback)
Inserts one or more documents.
voidinsertOne(TDocument document, SingleResultCallback callback)
Inserts the provided document.
ListIndexesIterablelistIndexes(Class resultClass)
Get all the indexes in this collection.
ListIndexesIterablelistIndexes(ClientSession clientSession)
Get all the indexes in this collection.
ListIndexesIterablelistIndexes()
Get all the indexes in this collection.
voidreplaceOne(Bson filter, TDocument replacement, UpdateOptions options, SingleResultCallback callback)
Replace a document in the collection according to the specified arguments.
voidreplaceOne(Bson filter, TDocument replacement, ReplaceOptions options, SingleResultCallback callback)
Replace a document in the collection according to the specified arguments.
voidreplaceOne(ClientSession clientSession, Bson filter, TDocument replacement, SingleResultCallback callback)
Replace a document in the collection according to the specified arguments.
voidupdateMany(Bson filter, Bson update, UpdateOptions options, SingleResultCallback callback)
Update all documents in the collection according to the specified arguments.
voidupdateMany(ClientSession clientSession, Bson filter, Bson update, SingleResultCallback callback)
Update all documents in the collection according to the specified arguments.
voidupdateMany(Bson filter, List update, UpdateOptions updateOptions, SingleResultCallback callback)
Update all documents in the collection according to the specified arguments.
voidupdateMany(ClientSession clientSession, Bson filter, List update, SingleResultCallback callback)
Update all documents in the collection according to the specified arguments.
voidupdateOne(Bson filter, Bson update, UpdateOptions options, SingleResultCallback callback)
Update a single document in the collection according to the specified arguments.
voidupdateOne(ClientSession clientSession, Bson filter, Bson update, SingleResultCallback callback)
Update a single document in the collection according to the specified arguments.
voidupdateOne(Bson filter, List update, UpdateOptions updateOptions, SingleResultCallback callback)
Update a single document in the collection according to the specified arguments.
voidupdateOne(ClientSession clientSession, Bson filter, List update, SingleResultCallback callback)
Update a single document in the collection according to the specified arguments.
voidupdateOne(Bson filter, Bson update, SingleResultCallback callback)
Update a single document in the collection according to the specified arguments.
voidupdateOne(Bson filter, List update, SingleResultCallback callback)
Update a single document in the collection according to the specified arguments.
MongoCollectionwithWriteConcern(WriteConcern writeConcern)
Create a new MongoCollection instance with a different write concern.