A B C D E F G H I J K L M N O P Q R S T U V W _ 
All Classes All Packages

A

abort() - Method in class com.mongodb.client.gridfs.GridFSUploadStream
Aborts the upload and deletes any data.
abortTransaction() - Method in interface com.mongodb.client.ClientSession
Abort a transaction in the context of this session.
action(MapReduceAction) - Method in interface com.mongodb.client.MapReduceIterable
Specify the MapReduceAction to be used when writing to a collection.
addClusterListener(ClusterListener) - Method in class com.mongodb.MongoClientOptions.Builder
Adds the given cluster listener.
addCommandListener(CommandListener) - Method in class com.mongodb.MongoClientOptions.Builder
Adds the given command listener.
addConnectionPoolListener(ConnectionPoolListener) - Method in class com.mongodb.MongoClientOptions.Builder
Adds the given connection pool listener.
addOption(int) - Method in class com.mongodb.DB
Deprecated.
addOption(int) - Method in class com.mongodb.DBCollection
Deprecated.
addOption(int) - Method in class com.mongodb.DBCursor
Deprecated.
addOption(int) - Method in class com.mongodb.Mongo
Deprecated.
Add options instead on instances of DBCursor
addServerListener(ServerListener) - Method in class com.mongodb.MongoClientOptions.Builder
Adds the given server listener.
addServerMonitorListener(ServerMonitorListener) - Method in class com.mongodb.MongoClientOptions.Builder
Adds the given server monitor listener.
addSpecial(String, Object) - Method in class com.mongodb.DBCursor
Deprecated.
Prefer per-operator methods, e.g. DBCursor.comment(String), DBCursor.explain(), etc.
addUser(String, char[]) - Method in class com.mongodb.DB
Deprecated.
Use DB.command to call either the createUser or updateUser command
addUser(String, char[], boolean) - Method in class com.mongodb.DB
Deprecated.
Use DB.command to call either the createUser or updateUser command
aggregate(ClientSession, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified aggregation pipeline.
aggregate(ClientSession, List<? extends Bson>) - Method in interface com.mongodb.client.MongoDatabase
Runs an aggregation framework pipeline on the database for pipeline stages that do not require an underlying collection, such as $currentOp and $listLocalSessions.
aggregate(ClientSession, List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified aggregation pipeline.
aggregate(ClientSession, List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Runs an aggregation framework pipeline on the database for pipeline stages that do not require an underlying collection, such as $currentOp and $listLocalSessions.
aggregate(DBObject, DBObject...) - Method in class com.mongodb.DBCollection
aggregate(List<? extends DBObject>) - Method in class com.mongodb.DBCollection
aggregate(List<? extends DBObject>, AggregationOptions) - Method in class com.mongodb.DBCollection
Method implements aggregation framework.
aggregate(List<? extends DBObject>, AggregationOptions, ReadPreference) - Method in class com.mongodb.DBCollection
Method implements aggregation framework.
aggregate(List<? extends DBObject>, ReadPreference) - Method in class com.mongodb.DBCollection
aggregate(List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified aggregation pipeline.
aggregate(List<? extends Bson>) - Method in interface com.mongodb.client.MongoDatabase
Runs an aggregation framework pipeline on the database for pipeline stages that do not require an underlying collection, such as $currentOp and $listLocalSessions.
aggregate(List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified aggregation pipeline.
aggregate(List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Runs an aggregation framework pipeline on the database for pipeline stages that do not require an underlying collection, such as $currentOp and $listLocalSessions.
AggregateIterable<TResult> - Interface in com.mongodb.client
Iterable for aggregate.
AggregationOptions - Class in com.mongodb
The options to apply to an aggregate operation.
AggregationOptions.Builder - Class in com.mongodb
Builder for creating AggregationOptions.
AggregationOptions.OutputMode - Enum in com.mongodb
Deprecated.
There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
AggregationOutput - Class in com.mongodb
Deprecated.
Replace with use of aggregate methods in DBCollection that return instances of Cursor.
all(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $all operand
ALL - Static variable in class com.mongodb.QueryOperators
 
allowDiskUse(Boolean) - Method in class com.mongodb.AggregationOptions.Builder
Set whether to enable external sort capabilities.
allowDiskUse(Boolean) - Method in interface com.mongodb.client.AggregateIterable
Enables writing to temporary files.
alwaysUseMBeans - Variable in class com.mongodb.MongoOptions
Deprecated.
Sets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater.
alwaysUseMBeans(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Deprecated.
there is no replacement for this property
and(DBObject...) - Method in class com.mongodb.QueryBuilder
Equivalent to an $and operand
and(String) - Method in class com.mongodb.QueryBuilder
Equivalent to QueryBuilder.put(key).
AND - Static variable in class com.mongodb.QueryOperators
 
applicationName(String) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the logical name of the application using this MongoClient.
arrayFilters(List<? extends DBObject>) - Method in class com.mongodb.BulkWriteRequestBuilder
Specifies that the request being built should use the given array filters for an update.
arrayFilters(List<? extends DBObject>) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the array filters option
arrayFilters(List<? extends DBObject>) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Sets the array filters option
arrayStart(String) - Method in class com.mongodb.util.JSONCallback
Deprecated.
 
autoEncryptionSettings(AutoEncryptionSettings) - Method in class com.mongodb.MongoClientOptions.Builder
Set options for auto-encryption.
available() - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 

B

batchSize(int) - Method in interface com.mongodb.client.AggregateIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.ChangeStreamIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.DistinctIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.FindIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
Sets the number of chunks to return per batch.
batchSize(int) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.ListCollectionsIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.ListDatabasesIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.ListIndexesIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.MapReduceIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the number of documents to return per batch.
batchSize(int) - Method in interface com.mongodb.client.MongoIterable
Sets the number of documents to return per batch.
batchSize(int) - Method in class com.mongodb.DBCursor
Limits the number of elements returned in one batch.
batchSize(int) - Method in class com.mongodb.ParallelScanOptions.Builder
Deprecated.
The batch size to use for each cursor.
batchSize(Integer) - Method in class com.mongodb.AggregationOptions.Builder
Sets the size of batches to use when iterating over results.
BOX - Static variable in class com.mongodb.QueryOperators
 
build() - Method in class com.mongodb.AggregationOptions.Builder
Return the options based on this builder.
build() - Method in class com.mongodb.MongoClientOptions.Builder
Build an instance of MongoClientOptions.
build() - Method in class com.mongodb.ParallelScanOptions.Builder
Deprecated.
Creates a ParallelScanOptions with the settings initialised in this builder.
builder() - Static method in class com.mongodb.AggregationOptions
Creates a new Builder for AggregationOptions.
builder() - Static method in class com.mongodb.MongoClientOptions
Creates a builder instance.
builder() - Static method in class com.mongodb.ParallelScanOptions
Deprecated.
Create a builder for the options
builder(MongoClientOptions) - Static method in class com.mongodb.MongoClientOptions
Creates a builder instance.
Builder() - Constructor for class com.mongodb.MongoClientOptions.Builder
Creates a Builder for MongoClientOptions, getting the appropriate system properties for initialization.
Builder() - Constructor for class com.mongodb.ParallelScanOptions.Builder
Deprecated.
 
Builder(MongoClientOptions) - Constructor for class com.mongodb.MongoClientOptions.Builder
Creates a Builder from an existing MongoClientOptions.
BulkUpdateRequestBuilder - Class in com.mongodb
A builder for a single update request.
bulkWrite(ClientSession, List<? extends WriteModel<? extends TDocument>>) - Method in interface com.mongodb.client.MongoCollection
Executes a mix of inserts, updates, replaces, and deletes.
bulkWrite(ClientSession, List<? extends WriteModel<? extends TDocument>>, BulkWriteOptions) - Method in interface com.mongodb.client.MongoCollection
Executes a mix of inserts, updates, replaces, and deletes.
bulkWrite(List<? extends WriteModel<? extends TDocument>>) - Method in interface com.mongodb.client.MongoCollection
Executes a mix of inserts, updates, replaces, and deletes.
bulkWrite(List<? extends WriteModel<? extends TDocument>>, BulkWriteOptions) - Method in interface com.mongodb.client.MongoCollection
Executes a mix of inserts, updates, replaces, and deletes.
BulkWriteError - Class in com.mongodb
Represents an error for an item included in a bulk write operation, e.g.
BulkWriteError(int, String, DBObject, int) - Constructor for class com.mongodb.BulkWriteError
Constructs a new instance.
BulkWriteException - Exception in com.mongodb
An exception that represents all errors associated with a bulk write operation.
BulkWriteOperation - Class in com.mongodb
A bulk write operation.
BulkWriteRequestBuilder - Class in com.mongodb
A builder for a single write request.
BulkWriteResult - Class in com.mongodb
The result of a successful bulk write operation.
BulkWriteResult() - Constructor for class com.mongodb.BulkWriteResult
 
BulkWriteUpsert - Class in com.mongodb
Represents an upsert request in a bulk write operation that resulted in an insert.
BulkWriteUpsert(int, Object) - Constructor for class com.mongodb.BulkWriteUpsert
Constructs an instance.
bypassDocumentValidation(Boolean) - Method in class com.mongodb.AggregationOptions.Builder
Sets whether to bypass document validation.
bypassDocumentValidation(Boolean) - Method in interface com.mongodb.client.AggregateIterable
Sets the bypass document level validation flag.
bypassDocumentValidation(Boolean) - Method in interface com.mongodb.client.MapReduceIterable
Sets the bypass document level validation flag.
bypassDocumentValidation(Boolean) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the bypassDocumentValidation
bypassDocumentValidation(Boolean) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Sets the bypass document level validation flag.
bypassDocumentValidation(Boolean) - Method in class com.mongodb.InsertOptions
Sets whether to bypass document validation.
Bytes - Class in com.mongodb
Deprecated.
there is no replacement for this class
Bytes() - Constructor for class com.mongodb.Bytes
Deprecated.
 

C

CENTER - Static variable in class com.mongodb.QueryOperators
 
CENTER_SPHERE - Static variable in class com.mongodb.QueryOperators
 
ChangeStreamIterable<TResult> - Interface in com.mongodb.client
Iterable for change streams.
CLI - Class in com.mongodb.gridfs
Deprecated.
there is no replacement for this class
CLI() - Constructor for class com.mongodb.gridfs.CLI
Deprecated.
 
ClientEncryption - Interface in com.mongodb.client.vault
The Key vault.
ClientEncryptions - Class in com.mongodb.client.vault
Factory for ClientEncryption implementations.
ClientSession - Interface in com.mongodb.client
A client session that supports transactions.
close() - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 
close() - Method in class com.mongodb.client.gridfs.GridFSUploadStream
 
close() - Method in interface com.mongodb.client.MongoClient
Close the client, which will close all underlying cached resources, including, for example, sockets and background monitoring threads.
close() - Method in interface com.mongodb.client.MongoCursor
 
close() - Method in interface com.mongodb.client.vault.ClientEncryption
 
close() - Method in interface com.mongodb.Cursor
Terminates this cursor on the server.
close() - Method in class com.mongodb.DBCursor
 
close() - Method in class com.mongodb.Mongo
Deprecated.
Closes all resources associated with this instance, in particular any open network connections.
close() - Method in class com.mongodb.MongoClient
Closes all resources associated with this instance, in particular any open network connections.
codecRegistry(CodecRegistry) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the codec registry
collation(Collation) - Method in class com.mongodb.AggregationOptions.Builder
Sets the collation
collation(Collation) - Method in class com.mongodb.BulkUpdateRequestBuilder
Sets the collation
collation(Collation) - Method in class com.mongodb.BulkWriteRequestBuilder
Sets the collation
collation(Collation) - Method in interface com.mongodb.client.AggregateIterable
Sets the collation options
collation(Collation) - Method in interface com.mongodb.client.ChangeStreamIterable
Sets the collation options
collation(Collation) - Method in interface com.mongodb.client.DistinctIterable
Sets the collation options
collation(Collation) - Method in interface com.mongodb.client.FindIterable
Sets the collation options
collation(Collation) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the collation options
collation(Collation) - Method in interface com.mongodb.client.MapReduceIterable
Sets the collation options
collation(Collation) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the collation
collation(Collation) - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Sets the collation
collation(Collation) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the collation
collation(Collation) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the collation
collation(Collation) - Method in class com.mongodb.client.model.DBCollectionRemoveOptions
Sets the collation
collation(Collation) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Sets the collation
collation(Collation) - Method in class com.mongodb.client.model.DBCreateViewOptions
Sets the collation
collectionExists(String) - Method in class com.mongodb.DB
Checks to see if a collection with a given name exists on a server.
collectionName(String) - Method in interface com.mongodb.client.MapReduceIterable
Sets the collectionName for the output of the MapReduce
com.mongodb - package com.mongodb
 
com.mongodb.client - package com.mongodb.client
This package contains the synchronous CRUD API.
com.mongodb.client.gridfs - package com.mongodb.client.gridfs
This package contains the new GridFS implementation
com.mongodb.client.jndi - package com.mongodb.client.jndi
This package contains a JNDI ObjectFactory implementation.
com.mongodb.client.model - package com.mongodb.client.model
 
com.mongodb.client.vault - package com.mongodb.client.vault
This package contains the Key Vault API
com.mongodb.gridfs - package com.mongodb.gridfs
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
com.mongodb.util - package com.mongodb.util
Contains classes that can be used everywhere in the driver, and have no specific domain.
command(DBObject) - Method in class com.mongodb.DB
Executes a database command.
command(DBObject, DBEncoder) - Method in class com.mongodb.DB
Executes a database command.
command(DBObject, ReadPreference) - Method in class com.mongodb.DB
Executes the command against the database with the given read preference.
command(DBObject, ReadPreference, DBEncoder) - Method in class com.mongodb.DB
Executes a database command with the selected readPreference, and encodes the command using the given encoder.
command(String) - Method in class com.mongodb.DB
Executes a database command.
command(String, ReadPreference) - Method in class com.mongodb.DB
Executes a database command.
CommandResult - Class in com.mongodb
A simple wrapper to hold the result of a command.
comment(String) - Method in interface com.mongodb.client.AggregateIterable
Sets the comment to the aggregation.
comment(String) - Method in interface com.mongodb.client.FindIterable
Sets the comment to the query.
comment(String) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the comment to the query.
comment(String) - Method in class com.mongodb.DBCursor
Adds a comment to the query to identify queries in the database profiler output.
COMMENT - Static variable in class com.mongodb.QueryOperators
Deprecated.
commitTransaction() - Method in interface com.mongodb.client.ClientSession
Commit a transaction in the context of this session.
compressorList(List<MongoCompressor>) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the compressors to use for compressing messages to the server.
connect() - Method in class com.mongodb.MongoURI
Deprecated.
Creates a Mongo instance based on the URI.
connect(MongoClientURI) - Method in class com.mongodb.Mongo.Holder
Deprecated.
Attempts to find an existing MongoClient instance matching that URI in the holder, and returns it if exists.
connect(MongoURI) - Method in class com.mongodb.Mongo.Holder
Deprecated.
connectCollection(DB) - Method in class com.mongodb.MongoURI
Deprecated.
Returns the URI's Collection from a given DB object.
connectCollection(Mongo) - Method in class com.mongodb.MongoURI
Deprecated.
Returns the URI's Collection from a given Mongo instance
connectDB() - Method in class com.mongodb.MongoURI
Deprecated.
Returns the DB object from a newly created Mongo instance based on this URI.
connectDB(Mongo) - Method in class com.mongodb.MongoURI
Deprecated.
Returns the URI's DB object from a given Mongo instance.
connectionsPerHost - Variable in class com.mongodb.MongoOptions
Deprecated.
The maximum number of connections allowed per host for this Mongo instance.
connectionsPerHost(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the maximum number of connections per host.
connectTimeout - Variable in class com.mongodb.MongoOptions
Deprecated.
The connection timeout in milliseconds.
connectTimeout(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the connection timeout.
containsField(String) - Method in class com.mongodb.gridfs.GridFSFile
 
containsField(String) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
containsKey(String) - Method in class com.mongodb.gridfs.GridFSFile
Deprecated.
containsKey(String) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
containsKey(String) - Method in class com.mongodb.ReflectionDBObject.JavaWrapper
Deprecated. 
continueOnError(boolean) - Method in class com.mongodb.InsertOptions
Set whether documents will continue to be inserted after a failure to insert one.
copy() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Copy this DBCollectionFindOptions instance into a new instance.
copy() - Method in class com.mongodb.DBCursor
Creates a copy of an existing database cursor.
copy() - Method in class com.mongodb.MongoOptions
Deprecated.
Copy this MongoOptions instance into a new instance.
count() - Method in interface com.mongodb.client.MongoCollection
count() - Method in class com.mongodb.DBCollection
count() - Method in class com.mongodb.DBCursor
Counts the number of objects matching the query.
count(ClientSession) - Method in interface com.mongodb.client.MongoCollection
count(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
count(ClientSession, Bson, CountOptions) - Method in interface com.mongodb.client.MongoCollection
count(DBObject) - Method in class com.mongodb.DBCollection
count(DBObject, DBCollectionCountOptions) - Method in class com.mongodb.DBCollection
Get the count of documents in collection that would match a criteria.
count(DBObject, ReadPreference) - Method in class com.mongodb.DBCollection
Get the count of documents in collection that would match a criteria.
count(Bson) - Method in interface com.mongodb.client.MongoCollection
Deprecated.
count(Bson, CountOptions) - Method in interface com.mongodb.client.MongoCollection
countDocuments() - Method in interface com.mongodb.client.MongoCollection
Counts the number of documents in the collection.
countDocuments(ClientSession) - Method in interface com.mongodb.client.MongoCollection
Counts the number of documents in the collection.
countDocuments(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Counts the number of documents in the collection according to the given options.
countDocuments(ClientSession, Bson, CountOptions) - Method in interface com.mongodb.client.MongoCollection
Counts the number of documents in the collection according to the given options.
countDocuments(Bson) - Method in interface com.mongodb.client.MongoCollection
Counts the number of documents in the collection according to the given options.
countDocuments(Bson, CountOptions) - Method in interface com.mongodb.client.MongoCollection
Counts the number of documents in the collection according to the given options.
create() - Static method in class com.mongodb.client.MongoClients
Creates a new client with the default connection string "mongodb://localhost".
create() - Method in interface com.mongodb.DBDecoderFactory
Creates an instance.
create() - Method in interface com.mongodb.DBEncoderFactory
Creates an instance.
create() - Method in class com.mongodb.DefaultDBCallback
 
create() - Method in class com.mongodb.util.JSONCallback
Deprecated.
 
create(boolean, List<String>) - Method in class com.mongodb.DefaultDBCallback
 
create(MongoDatabase) - Static method in class com.mongodb.client.gridfs.GridFSBuckets
Create a new GridFS bucket with the default 'fs' bucket name
create(MongoDatabase, String) - Static method in class com.mongodb.client.gridfs.GridFSBuckets
Create a new GridFS bucket with a custom bucket name
create(ClientEncryptionSettings) - Static method in class com.mongodb.client.vault.ClientEncryptions
Create a key vault with the given options.
create(ConnectionString) - Static method in class com.mongodb.client.MongoClients
Create a new client with the given connection string.
create(ConnectionString, MongoDriverInformation) - Static method in class com.mongodb.client.MongoClients
Create a new client with the given connection string.
create(DBCollection) - Method in interface com.mongodb.DBCallbackFactory
Creates a DBCallback for the given collection.
create(MongoClientSettings) - Static method in class com.mongodb.client.MongoClients
Create a new client with the given client settings.
create(MongoClientSettings, MongoDriverInformation) - Static method in class com.mongodb.client.MongoClients
Creates a new client with the given client settings.
create(String) - Static method in class com.mongodb.client.MongoClients
Create a new client with the given connection string as if by a call to MongoClients.create(ConnectionString).
createArray(byte[], int) - Method in class com.mongodb.LazyDBCallback
 
createChunk(Object, int, byte[]) - Method in class com.mongodb.gridfs.GridFSInputFile
Creates a new chunk of this file.
createCollection(ClientSession, String) - Method in interface com.mongodb.client.MongoDatabase
Create a new collection with the given name.
createCollection(ClientSession, String, CreateCollectionOptions) - Method in interface com.mongodb.client.MongoDatabase
Create a new collection with the selected options
createCollection(String) - Method in interface com.mongodb.client.MongoDatabase
Create a new collection with the given name.
createCollection(String, CreateCollectionOptions) - Method in interface com.mongodb.client.MongoDatabase
Create a new collection with the selected options
createCollection(String, DBObject) - Method in class com.mongodb.DB
Creates a collection with a given name and options.
createDataKey(String) - Method in interface com.mongodb.client.vault.ClientEncryption
Create a data key with the given KMS provider.
createDataKey(String, DataKeyOptions) - Method in interface com.mongodb.client.vault.ClientEncryption
Create a data key with the given KMS provider and options.
createDBRef(String, ObjectId) - Method in class com.mongodb.LazyDBCallback
 
createFile() - Method in class com.mongodb.gridfs.GridFS
This method creates an empty GridFSInputFile instance.
createFile(byte[]) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createFile(File) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createFile(InputStream) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createFile(InputStream, boolean) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createFile(InputStream, String) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createFile(InputStream, String, boolean) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createFile(String) - Method in class com.mongodb.gridfs.GridFS
Creates a file entry.
createIndex(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Create an index with the given keys.
createIndex(ClientSession, Bson, IndexOptions) - Method in interface com.mongodb.client.MongoCollection
Create an index with the given keys and options.
createIndex(DBObject) - Method in class com.mongodb.DBCollection
Creates an index on the field specified, if that index does not already exist.
createIndex(DBObject, DBObject) - Method in class com.mongodb.DBCollection
Creates an index on the field specified, if that index does not already exist.
createIndex(DBObject, String) - Method in class com.mongodb.DBCollection
Forces creation of an index on a set of fields, if one does not already exist.
createIndex(DBObject, String, boolean) - Method in class com.mongodb.DBCollection
Forces creation of an index on a set of fields, if one does not already exist.
createIndex(String) - Method in class com.mongodb.DBCollection
Forces creation of an ascending index on a field with the default options.
createIndex(Bson) - Method in interface com.mongodb.client.MongoCollection
Create an index with the given keys.
createIndex(Bson, IndexOptions) - Method in interface com.mongodb.client.MongoCollection
Create an index with the given keys and options.
createIndexes(ClientSession, List<IndexModel>) - Method in interface com.mongodb.client.MongoCollection
Create multiple indexes.
createIndexes(ClientSession, List<IndexModel>, CreateIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Create multiple indexes.
createIndexes(List<IndexModel>) - Method in interface com.mongodb.client.MongoCollection
Create multiple indexes.
createIndexes(List<IndexModel>, CreateIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Create multiple indexes.
createList() - Method in class com.mongodb.util.JSONCallback
Deprecated.
 
createObject(byte[], int) - Method in class com.mongodb.LazyDBCallback
 
createView(ClientSession, String, String, List<? extends Bson>) - Method in interface com.mongodb.client.MongoDatabase
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
createView(ClientSession, String, String, List<? extends Bson>, CreateViewOptions) - Method in interface com.mongodb.client.MongoDatabase
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
createView(String, String, List<? extends DBObject>) - Method in class com.mongodb.DB
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
createView(String, String, List<? extends DBObject>, DBCreateViewOptions) - Method in class com.mongodb.DB
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
createView(String, String, List<? extends Bson>) - Method in interface com.mongodb.client.MongoDatabase
Creates a view with the given name, backing collection/view name, and aggregation pipeline that defines the view.
createView(String, String, List<? extends Bson>, CreateViewOptions) - Method in interface com.mongodb.client.MongoDatabase
Creates a view with the given name, backing collection/view name, aggregation pipeline, and options that defines the view.
curr() - Method in class com.mongodb.DBCursor
Returns the element the cursor is at.
cursor() - Method in interface com.mongodb.client.ChangeStreamIterable
Returns a cursor used for iterating over elements of type ChangeStreamDocument<TResult>.
cursor() - Method in interface com.mongodb.client.MongoIterable
Returns a cursor used for iterating over elements of type TResult.
Cursor - Interface in com.mongodb
Interface for providing consistent behaviour between different Cursor implementations.
CURSOR - com.mongodb.AggregationOptions.OutputMode
Deprecated.
The output of the aggregate operation is returned using a cursor.
cursorFinalizerEnabled - Variable in class com.mongodb.MongoOptions
Deprecated.
Sets whether there is a a finalize method created that cleans up instances of DBCursor that the client does not close.
cursorFinalizerEnabled(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Sets whether cursor finalizers are enabled.
cursorType(CursorType) - Method in interface com.mongodb.client.FindIterable
Sets the cursor type.
cursorType(CursorType) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the cursor type.
cursorType(CursorType) - Method in class com.mongodb.DBCursor
Sets the cursor type.

D

databaseName(String) - Method in interface com.mongodb.client.MapReduceIterable
Sets the name of the database to output into.
DB - Class in com.mongodb
A thread-safe client view of a logical database in a MongoDB cluster.
DB(Mongo, String) - Constructor for class com.mongodb.DB
Deprecated.
DBAddress - Class in com.mongodb
Deprecated.
This class is no longer needed, as the driver does not rely on it for anything anymore. Use ServerAddress instead.
DBAddress(DBAddress, String) - Constructor for class com.mongodb.DBAddress
Deprecated.
Create a DBAddress using the host and port from an existing DBAddress, and connected to a given database.
DBAddress(String) - Constructor for class com.mongodb.DBAddress
Deprecated.
Creates a new address.
DBAddress(String, int, String) - Constructor for class com.mongodb.DBAddress
Deprecated.
Creates a DBAddress for the given database on the given host at the given port.
DBAddress(String, String) - Constructor for class com.mongodb.DBAddress
Deprecated.
Creates a DBAddress for the given database on the given host.
DBAddress(InetAddress, int, String) - Constructor for class com.mongodb.DBAddress
Deprecated.
 
DBCallback - Interface in com.mongodb
The DB callback interface.
DBCallbackFactory - Interface in com.mongodb
Factory for creating concrete implementations of DBCallback.
DBCollection - Class in com.mongodb
Implementation of a database collection.
DBCollection(DB, String) - Constructor for class com.mongodb.DBCollection
Initializes a new collection.
DBCollectionCountOptions - Class in com.mongodb.client.model
The options for a count operation.
DBCollectionCountOptions() - Constructor for class com.mongodb.client.model.DBCollectionCountOptions
Construct a new instance
DBCollectionDistinctOptions - Class in com.mongodb.client.model
The options for a distinct operation.
DBCollectionDistinctOptions() - Constructor for class com.mongodb.client.model.DBCollectionDistinctOptions
Construct a new instance
DBCollectionFindAndModifyOptions - Class in com.mongodb.client.model
The oprtions for find and modify operations.
DBCollectionFindAndModifyOptions() - Constructor for class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Construct a new instance
DBCollectionFindOptions - Class in com.mongodb.client.model
The options to apply to a find operation (also commonly referred to as a query).
DBCollectionFindOptions() - Constructor for class com.mongodb.client.model.DBCollectionFindOptions
Construct a new instance
DBCollectionRemoveOptions - Class in com.mongodb.client.model
The options to apply when removing documents from the DBCollection
DBCollectionRemoveOptions() - Constructor for class com.mongodb.client.model.DBCollectionRemoveOptions
Construct a new instance
DBCollectionUpdateOptions - Class in com.mongodb.client.model
The options to apply when updating documents in the DBCollection
DBCollectionUpdateOptions() - Constructor for class com.mongodb.client.model.DBCollectionUpdateOptions
Construct a new instance
DBCreateViewOptions - Class in com.mongodb.client.model
The options to apply when creating a view
DBCreateViewOptions() - Constructor for class com.mongodb.client.model.DBCreateViewOptions
 
DBCursor - Class in com.mongodb
An iterator over database results.
DBCursor(DBCollection, DBObject, DBObject, ReadPreference) - Constructor for class com.mongodb.DBCursor
Initializes a new database cursor.
DBCursor(DBCollection, DBObject, DBObject, ReadPreference, boolean) - Constructor for class com.mongodb.DBCursor
Initializes a new database cursor.
DBDecoder - Interface in com.mongodb
An interface for decoders of BSON into instances of DBObject that belong to a DBCollection.
dbDecoderFactory - Variable in class com.mongodb.MongoOptions
Deprecated.
Override the DBCallback factory.
dbDecoderFactory(DBDecoderFactory) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the decoder factory.
DBDecoderFactory - Interface in com.mongodb
Creates concrete DBDecoder instances.
dbEncoder(DBEncoder) - Method in class com.mongodb.InsertOptions
Set the encoder to use for the documents.
DBEncoder - Interface in com.mongodb
An interface for encoders of BSONObject to BSON.
dbEncoderFactory - Variable in class com.mongodb.MongoOptions
Deprecated.
Override the encoding factory.
dbEncoderFactory(DBEncoderFactory) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the encoder factory.
DBEncoderFactory - Interface in com.mongodb
Creates concrete DBEncoder instances.
decode(byte[], DBCollection) - Method in interface com.mongodb.DBDecoder
Decode a single DBObject belonging to the given collection from the given array of bytes.
decode(byte[], DBCollection) - Method in class com.mongodb.DefaultDBDecoder
 
decode(byte[], DBCollection) - Method in class com.mongodb.LazyDBDecoder
 
decode(InputStream, DBCollection) - Method in interface com.mongodb.DBDecoder
Decode a single DBObject belonging to the given collection from the given input stream.
decode(InputStream, DBCollection) - Method in class com.mongodb.DefaultDBDecoder
 
decode(InputStream, DBCollection) - Method in class com.mongodb.LazyDBDecoder
 
decrypt(BsonBinary) - Method in interface com.mongodb.client.vault.ClientEncryption
Decrypt the given value.
DEFAULT_BUCKET - Static variable in class com.mongodb.gridfs.GridFS
Bucket to use for the collection namespaces
DEFAULT_CHUNKSIZE - Static variable in class com.mongodb.gridfs.GridFS
File's chunk size
DefaultDBCallback - Class in com.mongodb
An implementation of DBCallback that decodes into a DBObject.
DefaultDBCallback(DBCollection) - Constructor for class com.mongodb.DefaultDBCallback
Creates a new DefaultDBCallback.
DefaultDBDecoder - Class in com.mongodb
An implementation of DBDecoder
DefaultDBDecoder() - Constructor for class com.mongodb.DefaultDBDecoder
 
DefaultDBEncoder - Class in com.mongodb
The default BSON encoder for BSONObject instances.
DefaultDBEncoder() - Constructor for class com.mongodb.DefaultDBEncoder
 
delete(ClientSession, BsonValue) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.
delete(ClientSession, ObjectId) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.
delete(BsonValue) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.
delete(ObjectId) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Given a id, delete this stored file's files collection document and associated chunks from a GridFS bucket.
deleteMany(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Removes all documents from the collection that match the given query filter.
deleteMany(ClientSession, Bson, DeleteOptions) - Method in interface com.mongodb.client.MongoCollection
Removes all documents from the collection that match the given query filter.
deleteMany(Bson) - Method in interface com.mongodb.client.MongoCollection
Removes all documents from the collection that match the given query filter.
deleteMany(Bson, DeleteOptions) - Method in interface com.mongodb.client.MongoCollection
Removes all documents from the collection that match the given query filter.
deleteOne(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Removes at most one document from the collection that matches the given filter.
deleteOne(ClientSession, Bson, DeleteOptions) - Method in interface com.mongodb.client.MongoCollection
Removes at most one document from the collection that matches the given filter.
deleteOne(Bson) - Method in interface com.mongodb.client.MongoCollection
Removes at most one document from the collection that matches the given filter.
deleteOne(Bson, DeleteOptions) - Method in interface com.mongodb.client.MongoCollection
Removes at most one document from the collection that matches the given filter.
description - Variable in class com.mongodb.MongoOptions
Deprecated.
The description for Mongo instances created with these options.
description(String) - Method in class com.mongodb.MongoClientOptions.Builder
distinct(ClientSession, String, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Gets the distinct values of the specified field name.
distinct(ClientSession, String, Bson, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Gets the distinct values of the specified field name.
distinct(String) - Method in class com.mongodb.DBCollection
Find the distinct values for a specified field across a collection and returns the results in an array.
distinct(String, DBCollectionDistinctOptions) - Method in class com.mongodb.DBCollection
Find the distinct values for a specified field across a collection and returns the results in an array.
distinct(String, DBObject) - Method in class com.mongodb.DBCollection
Find the distinct values for a specified field across a collection and returns the results in an array.
distinct(String, DBObject, ReadPreference) - Method in class com.mongodb.DBCollection
Find the distinct values for a specified field across a collection and returns the results in an array.
distinct(String, ReadPreference) - Method in class com.mongodb.DBCollection
Find the distinct values for a specified field across a collection and returns the results in an array.
distinct(String, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Gets the distinct values of the specified field name.
distinct(String, Bson, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Gets the distinct values of the specified field name.
DistinctIterable<TResult> - Interface in com.mongodb.client
Iterable interface for distinct.
doEval(String, Object...) - Method in class com.mongodb.DB
Deprecated.
The eval command was deprecated in MongoDB 3.0
doGetCollection(String) - Method in class com.mongodb.DB
Deprecated.
there is no replacement for this method
downloadToStream(ClientSession, String, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream.
downloadToStream(ClientSession, String, OutputStream, GridFSDownloadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream.
downloadToStream(ClientSession, BsonValue, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the stored file specified by id and writes the contents to the destination Stream.
downloadToStream(ClientSession, ObjectId, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the stored file specified by id and writes the contents to the destination Stream.
downloadToStream(String, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the latest version of the stored file specified by filename and writes the contents to the destination Stream.
downloadToStream(String, OutputStream, GridFSDownloadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the stored file specified by filename and by the revision in options and writes the contents to the destination Stream.
downloadToStream(BsonValue, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the stored file specified by id and writes the contents to the destination Stream.
downloadToStream(ObjectId, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Downloads the contents of the stored file specified by id and writes the contents to the destination Stream.
downloadToStreamByName(String, OutputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
downloadToStreamByName(String, OutputStream, GridFSDownloadByNameOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
drop() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Drops the data associated with this bucket from the database.
drop() - Method in interface com.mongodb.client.MongoCollection
Drops this collection from the Database.
drop() - Method in interface com.mongodb.client.MongoDatabase
Drops this database.
drop() - Method in class com.mongodb.DBCollection
Drops (deletes) this collection from the database.
drop() - Method in class com.mongodb.MapReduceOutput
Drops the collection that holds the results.
drop(ClientSession) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Drops the data associated with this bucket from the database.
drop(ClientSession) - Method in interface com.mongodb.client.MongoCollection
Drops this collection from the Database.
drop(ClientSession) - Method in interface com.mongodb.client.MongoDatabase
Drops this database.
dropDatabase() - Method in class com.mongodb.DB
Drops this database.
dropDatabase(String) - Method in class com.mongodb.Mongo
Deprecated.
Drops the database if it exists.
dropIndex(ClientSession, String) - Method in interface com.mongodb.client.MongoCollection
Drops the index given its name.
dropIndex(ClientSession, String, DropIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Drops the index given its name.
dropIndex(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Drops the index given the keys used to create it.
dropIndex(ClientSession, Bson, DropIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Drops the index given the keys used to create it.
dropIndex(DBObject) - Method in class com.mongodb.DBCollection
Drops an index from this collection.
dropIndex(String) - Method in interface com.mongodb.client.MongoCollection
Drops the index given its name.
dropIndex(String) - Method in class com.mongodb.DBCollection
Drops the index with the given name from this collection.
dropIndex(String, DropIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Drops the index given its name.
dropIndex(Bson) - Method in interface com.mongodb.client.MongoCollection
Drops the index given the keys used to create it.
dropIndex(Bson, DropIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Drops the index given the keys used to create it.
dropIndexes() - Method in interface com.mongodb.client.MongoCollection
Drop all the indexes on this collection, except for the default on _id.
dropIndexes() - Method in class com.mongodb.DBCollection
Drop all indexes on this collection.
dropIndexes(ClientSession) - Method in interface com.mongodb.client.MongoCollection
Drop all the indexes on this collection, except for the default on _id.
dropIndexes(ClientSession, DropIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Drop all the indexes on this collection, except for the default on _id.
dropIndexes(DropIndexOptions) - Method in interface com.mongodb.client.MongoCollection
Drop all the indexes on this collection, except for the default on _id.
dropIndexes(String) - Method in class com.mongodb.DBCollection
Drops the index with the given name from this collection.

E

ELEM_MATCH - Static variable in class com.mongodb.QueryOperators
 
elemMatch(DBObject) - Method in class com.mongodb.QueryBuilder
Equivalent to the $elemMatch operand
encoder(DBEncoder) - Method in class com.mongodb.client.model.DBCollectionRemoveOptions
Sets the encoder
encoder(DBEncoder) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Sets the encoder
encrypt(BsonValue, EncryptOptions) - Method in interface com.mongodb.client.vault.ClientEncryption
Encrypt the given value with the given options.
equals(Object) - Method in class com.mongodb.BulkWriteError
 
equals(Object) - Method in exception com.mongodb.BulkWriteException
 
equals(Object) - Method in class com.mongodb.BulkWriteUpsert
 
equals(Object) - Method in class com.mongodb.DBAddress
Deprecated.
 
equals(Object) - Method in class com.mongodb.MongoClientOptions
 
equals(Object) - Method in class com.mongodb.MongoClientURI
 
equals(Object) - Method in class com.mongodb.MongoOptions
Deprecated.
 
equals(Object) - Method in class com.mongodb.WriteConcernError
 
estimatedDocumentCount() - Method in interface com.mongodb.client.MongoCollection
Gets an estimate of the count of documents in a collection using collection metadata.
estimatedDocumentCount(EstimatedDocumentCountOptions) - Method in interface com.mongodb.client.MongoCollection
Gets an estimate of the count of documents in a collection using collection metadata.
eval(String, Object...) - Method in class com.mongodb.DB
Deprecated.
The eval command was deprecated in MongoDB 3.0
execute() - Method in class com.mongodb.BulkWriteOperation
Execute the bulk write operation with the default write concern of the collection from which this came.
execute() - Method in interface com.mongodb.client.TransactionBody
Execute the body of the transaction.
execute(WriteConcern) - Method in class com.mongodb.BulkWriteOperation
Execute the bulk write operation with the given write concern.
exists(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $exists operand
EXISTS - Static variable in class com.mongodb.QueryOperators
 
explain() - Method in class com.mongodb.DBCursor
Deprecated.
Replace with direct use of the explain command using the runCommand helper method
EXPLAIN - Static variable in class com.mongodb.QueryOperators
Deprecated.
explainAggregate(List<? extends DBObject>, AggregationOptions) - Method in class com.mongodb.DBCollection
Return the explain plan for the aggregation pipeline.

F

FACTORY - Static variable in class com.mongodb.DefaultDBCallback
 
FACTORY - Static variable in class com.mongodb.DefaultDBDecoder
 
FACTORY - Static variable in class com.mongodb.DefaultDBEncoder
 
FACTORY - Static variable in class com.mongodb.LazyDBDecoder
 
filter(DBObject) - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Sets the selection query to determine the subset of documents from which to retrieve the distinct values.
filter(Bson) - Method in interface com.mongodb.client.DistinctIterable
Sets the query filter to apply to the query.
filter(Bson) - Method in interface com.mongodb.client.FindIterable
Sets the query filter to apply to the query.
filter(Bson) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the query filter to apply to the query.
filter(Bson) - Method in interface com.mongodb.client.ListCollectionsIterable
Sets the query filter to apply to the query.
filter(Bson) - Method in interface com.mongodb.client.ListDatabasesIterable
Sets the query filter to apply to the returned database names.
filter(Bson) - Method in interface com.mongodb.client.MapReduceIterable
Sets the query filter to apply to the query.
finalizeFunction(String) - Method in interface com.mongodb.client.MapReduceIterable
Sets the JavaScript function that follows the reduce method and modifies the output.
find() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Finds all documents in the files collection.
find() - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find() - Method in class com.mongodb.DBCollection
Select all documents in collection and get a cursor to the selected documents.
find(ClientSession) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Finds all documents in the files collection.
find(ClientSession) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(ClientSession, Bson) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Finds all documents in the collection that match the filter.
find(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(ClientSession, Bson, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(DBObject) - Method in class com.mongodb.BulkWriteOperation
Start building a write request to add to the bulk write operation.
find(DBObject) - Method in class com.mongodb.DBCollection
Select documents in collection and get a cursor to the selected documents.
find(DBObject) - Method in class com.mongodb.gridfs.GridFS
Finds a list of files matching the given query.
find(DBObject, DBCollectionFindOptions) - Method in class com.mongodb.DBCollection
Select documents in collection and get a cursor to the selected documents.
find(DBObject, DBObject) - Method in class com.mongodb.DBCollection
Select documents in collection and get a cursor to the selected documents.
find(DBObject, DBObject) - Method in class com.mongodb.gridfs.GridFS
Finds a list of files matching the given query.
find(DBObject, DBObject, int, int) - Method in class com.mongodb.DBCollection
Deprecated.
find(DBObject, DBObject, int, int, int) - Method in class com.mongodb.DBCollection
find(Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(String) - Method in class com.mongodb.gridfs.GridFS
Finds a list of files matching the given filename.
find(String, DBObject) - Method in class com.mongodb.gridfs.GridFS
Finds a list of files matching the given filename.
find(Bson) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Finds all documents in the collection that match the filter.
find(Bson) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(Bson, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Finds all documents in the collection.
find(ObjectId) - Method in class com.mongodb.gridfs.GridFS
Finds one file matching the given objectId.
findAndModify(DBObject, DBCollectionFindAndModifyOptions) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject, boolean, DBObject, boolean, boolean) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject, boolean, DBObject, boolean, boolean, boolean, long, TimeUnit) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject, boolean, DBObject, boolean, boolean, boolean, long, TimeUnit, WriteConcern) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject, boolean, DBObject, boolean, boolean, long, TimeUnit) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject, boolean, DBObject, boolean, boolean, long, TimeUnit, WriteConcern) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndModify(DBObject, DBObject, DBObject, boolean, DBObject, boolean, boolean, WriteConcern) - Method in class com.mongodb.DBCollection
Atomically modify and return a single document.
findAndRemove(DBObject) - Method in class com.mongodb.DBCollection
Atomically remove and return a single document.
FindIterable<TResult> - Interface in com.mongodb.client
Iterable for find.
findOne() - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(DBObject) - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(DBObject) - Method in class com.mongodb.gridfs.GridFS
Finds one file matching the given query.
findOne(DBObject, DBCollectionFindOptions) - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(DBObject, DBObject) - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(DBObject, DBObject, DBObject) - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(DBObject, DBObject, DBObject, ReadPreference) - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(DBObject, DBObject, ReadPreference) - Method in class com.mongodb.DBCollection
Get a single document from collection.
findOne(Object) - Method in class com.mongodb.DBCollection
Get a single document from collection by '_id'.
findOne(Object, DBObject) - Method in class com.mongodb.DBCollection
Get a single document from collection by '_id'.
findOne(String) - Method in class com.mongodb.gridfs.GridFS
Finds one file matching the given filename.
findOne(ObjectId) - Method in class com.mongodb.gridfs.GridFS
Finds one file matching the given objectId.
findOneAndDelete(ClientSession, Bson) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and remove it.
findOneAndDelete(ClientSession, Bson, FindOneAndDeleteOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and remove it.
findOneAndDelete(Bson) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and remove it.
findOneAndDelete(Bson, FindOneAndDeleteOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and remove it.
findOneAndReplace(ClientSession, Bson, TDocument) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and replace it.
findOneAndReplace(ClientSession, Bson, TDocument, FindOneAndReplaceOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and replace it.
findOneAndReplace(Bson, TDocument) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and replace it.
findOneAndReplace(Bson, TDocument, FindOneAndReplaceOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and replace it.
findOneAndUpdate(ClientSession, Bson, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(ClientSession, Bson, List<? extends Bson>, FindOneAndUpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(ClientSession, Bson, Bson) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(ClientSession, Bson, Bson, FindOneAndUpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(Bson, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(Bson, List<? extends Bson>, FindOneAndUpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(Bson, Bson) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
findOneAndUpdate(Bson, Bson, FindOneAndUpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Atomically find a document and update it.
first() - Method in interface com.mongodb.client.MongoIterable
Helper to return the first item in the iterator or null.
flush() - Method in class com.mongodb.client.gridfs.GridFSUploadStream
 
forEach(Block<? super TResult>) - Method in interface com.mongodb.client.MongoIterable
Deprecated.
Prefer Iterable.forEach(Consumer), which was added in Java 8
fsync - Variable in class com.mongodb.MongoOptions
Deprecated.
The "fsync" value of the global WriteConcern.
fsync(boolean) - Method in class com.mongodb.Mongo
Deprecated.
fsyncAndLock() - Method in class com.mongodb.Mongo
Deprecated.
fullDocument(FullDocument) - Method in interface com.mongodb.client.ChangeStreamIterable
Sets the fullDocument value.

G

get() - Method in class com.mongodb.QueryBuilder
Creates a DBObject query to be used for the driver's find operations
get(ReflectionDBObject, String) - Method in class com.mongodb.ReflectionDBObject.JavaWrapper
Deprecated.
Gets the value for the given field from the given document.
get(String) - Method in class com.mongodb.gridfs.GridFSFile
 
get(String) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
get_id() - Method in class com.mongodb.ReflectionDBObject
Deprecated.
Gets the _id
getAddress() - Method in class com.mongodb.Mongo
Deprecated.
getAliases() - Method in class com.mongodb.gridfs.GridFSFile
Gets the aliases from the metadata.
getAllAddress() - Method in class com.mongodb.Mongo
Deprecated.
getAllowDiskUse() - Method in class com.mongodb.AggregationOptions
If true, this enables external sort capabilities, otherwise $sort produces an error if the operation consumes 10 percent or more of RAM.
getApplicationName() - Method in class com.mongodb.MongoClientOptions
Gets the logical name of the application using this MongoClient.
getArrayFilters() - Method in class com.mongodb.BulkUpdateRequestBuilder
Gets the array filters to apply to the update operation
getArrayFilters() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the array filters option
getArrayFilters() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Returns the array filters option
getAutoEncryptionSettings() - Method in class com.mongodb.MongoClientOptions
Gets the auto-encryption settings
getBatchSize() - Method in class com.mongodb.AggregationOptions
The size of batches to use when iterating over results.
getBatchSize() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Gets the number of documents to return per batch.
getBatchSize() - Method in class com.mongodb.DBCursor
Gets the batch size.
getBatchSize() - Method in class com.mongodb.ParallelScanOptions
Deprecated.
Gets the batch size to use for each cursor.
getBucketName() - Method in interface com.mongodb.client.gridfs.GridFSBucket
The bucket name.
getBucketName() - Method in class com.mongodb.gridfs.GridFS
Gets the bucket name used in the collection's namespace.
getBypassDocumentValidation() - Method in class com.mongodb.AggregationOptions
Gets whether to bypass document validation, or null if unspecified.
getBypassDocumentValidation() - Method in class com.mongodb.BulkWriteOperation
Gets whether to bypass document validation, or null if unspecified.
getBypassDocumentValidation() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the bypassDocumentValidation
getBypassDocumentValidation() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Gets the the bypass document level validation flag
getBypassDocumentValidation() - Method in class com.mongodb.InsertOptions
Gets whether to bypass document validation, or null if unspecified.
getBypassDocumentValidation() - Method in class com.mongodb.MapReduceCommand
Gets whether to bypass document validation, or null if unspecified.
getChunksCollection() - Method in class com.mongodb.gridfs.GridFS
Gets the DBCollection in which the binary chunks are stored.
getChunkSize() - Method in class com.mongodb.gridfs.GridFSFile
Gets the size of a chunk.
getChunkSizeBytes() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Sets the chunk size in bytes.
getClusterDescription() - Method in interface com.mongodb.client.MongoClient
Gets the current cluster description.
getClusterListeners() - Method in class com.mongodb.MongoClientOptions
Gets the list of added ClusterListener.
getCode() - Method in class com.mongodb.BulkWriteError
Gets the code associated with this error.
getCode() - Method in class com.mongodb.WriteConcernError
Gets the code associated with this error.
getCodecRegistry() - Method in interface com.mongodb.client.MongoCollection
Get the codec registry for the MongoCollection.
getCodecRegistry() - Method in interface com.mongodb.client.MongoDatabase
Get the codec registry for the MongoDatabase.
getCodecRegistry() - Method in class com.mongodb.MongoClientOptions
The codec registry to use.
getCollation() - Method in class com.mongodb.AggregationOptions
Returns the collation options
getCollation() - Method in class com.mongodb.BulkUpdateRequestBuilder
Returns the collation
getCollation() - Method in class com.mongodb.BulkWriteRequestBuilder
Returns the collation
getCollation() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Returns the collation options
getCollation() - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Returns the collation options
getCollation() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the collation options
getCollation() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the collation options
getCollation() - Method in class com.mongodb.client.model.DBCollectionRemoveOptions
Returns the collation options
getCollation() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Returns the collation options
getCollation() - Method in class com.mongodb.client.model.DBCreateViewOptions
Returns the collation options
getCollation() - Method in class com.mongodb.DBCursor
Returns the collation options
getCollation() - Method in class com.mongodb.MapReduceCommand
Returns the collation
getCollection() - Method in class com.mongodb.DBCursor
Gets the collection.
getCollection() - Method in class com.mongodb.MongoClientURI
Gets the collection name
getCollection() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the collection name.
getCollection(String) - Method in interface com.mongodb.client.MongoDatabase
Gets a collection.
getCollection(String) - Method in class com.mongodb.DB
Gets a collection with a given name.
getCollection(String) - Method in class com.mongodb.DBCollection
Find a collection that is prefixed with this collection's name.
getCollection(String, Class<TDocument>) - Method in interface com.mongodb.client.MongoDatabase
Gets a collection, with a specific default document class.
getCollectionFromString(String) - Method in class com.mongodb.DB
Deprecated.
getCollectionName() - Method in class com.mongodb.MapReduceOutput
Get the name of the collection that the results of the map reduce were saved into.
getCollectionNames() - Method in class com.mongodb.DB
Returns a set containing the names of all collections in this database.
getCommand() - Method in class com.mongodb.MapReduceOutput
Get the original command that was sent to the database.
getCommandListeners() - Method in class com.mongodb.MongoClientOptions
Gets the list of added CommandListener.
getComment() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the comment to send with the query.
getCompressorList() - Method in class com.mongodb.MongoClientOptions
Gets the compressors to use for compressing messages to the server.
getConnectionPoolListeners() - Method in class com.mongodb.MongoClientOptions
Gets the list of added ConnectionPoolListener.
getConnectionsPerHost() - Method in class com.mongodb.MongoClientOptions
The maximum number of connections allowed per host for this MongoClient instance.
getConnectionsPerHost() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the maximum number of connections allowed per host for this Mongo instance.
getConnectPoint() - Method in class com.mongodb.Mongo
Deprecated.
getConnectTimeout() - Method in class com.mongodb.MongoClientOptions
The connection timeout in milliseconds.
getConnectTimeout() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the connection timeout in milliseconds.
getContentType() - Method in class com.mongodb.gridfs.GridFSFile
Gets the content type.
getCount() - Method in class com.mongodb.DBCollection
Get the count of documents in collection.
getCount(DBObject) - Method in class com.mongodb.DBCollection
Get the count of documents in collection that would match a criteria.
getCount(DBObject, DBCollectionCountOptions) - Method in class com.mongodb.DBCollection
Get the count of documents in collection that would match a criteria.
getCount(DBObject, DBObject) - Method in class com.mongodb.DBCollection
getCount(DBObject, DBObject, long, long) - Method in class com.mongodb.DBCollection
getCount(DBObject, DBObject, long, long, ReadPreference) - Method in class com.mongodb.DBCollection
getCount(DBObject, DBObject, ReadPreference) - Method in class com.mongodb.DBCollection
getCount(ReadPreference) - Method in class com.mongodb.DBCollection
Get the count of documents in collection.
getCredential() - Method in class com.mongodb.MongoClient
Gets the credential that this client authenticates all connections with
getCredentials() - Method in class com.mongodb.MongoClientURI
Gets the credentials.
getCredentials() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the credentials.
getCredentialsList() - Method in class com.mongodb.MongoClient
Deprecated.
getCursorId() - Method in interface com.mongodb.Cursor
Gets the server's identifier for this Cursor.
getCursorId() - Method in class com.mongodb.DBCursor
 
getCursorType() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Get the cursor type.
getDatabase() - Method in class com.mongodb.MongoClientURI
Gets the database name
getDatabase() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the database name.
getDatabase(String) - Method in interface com.mongodb.client.MongoClient
Gets a MongoDatabase instance for the given database name.
getDatabase(String) - Method in class com.mongodb.MongoClient
 
getDatabaseName() - Method in class com.mongodb.MapReduceOutput
Get the name of the database that the results of the map reduce were saved into.
getDatabaseNames() - Method in class com.mongodb.Mongo
Deprecated.
getDB() - Method in class com.mongodb.DBCollection
Returns the database this collection is a member of.
getDB() - Method in class com.mongodb.gridfs.GridFS
Gets the database used.
getDB(String) - Method in class com.mongodb.Mongo
Deprecated.
This method is not currently scheduled for removal, but prefer MongoClient.getDatabase(String) for new code. Note that DB and MongoDatabase can be used together in the same application, whith the same MongoClient instance.
getDBCallback(DBCollection) - Method in interface com.mongodb.DBDecoder
Get a callback for the given collection.
getDBCallback(DBCollection) - Method in class com.mongodb.DefaultDBDecoder
 
getDBCallback(DBCollection) - Method in class com.mongodb.LazyDBDecoder
 
getDbDecoderFactory() - Method in class com.mongodb.MongoClientOptions
Override the decoder factory.
getDbDecoderFactory() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the DBCallback factory.
getDBDecoderFactory() - Method in class com.mongodb.DBCollection
Get the decoder factory for this collection.
getDbEncoder() - Method in class com.mongodb.InsertOptions
The encoder to use for the documents.
getDbEncoderFactory() - Method in class com.mongodb.MongoClientOptions
Override the encoder factory.
getDbEncoderFactory() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the encoding factory.
getDBEncoderFactory() - Method in class com.mongodb.DBCollection
Get the encoder factory for this collection.
getDBName() - Method in class com.mongodb.DBAddress
Deprecated.
Gets the database name
getDecoderFactory() - Method in class com.mongodb.DBCursor
Gets the decoder factory that creates the decoder this cursor will use to decode objects from MongoDB.
getDefaultCodecRegistry() - Static method in class com.mongodb.MongoClient
Gets the default codec registry.
getDescription() - Method in class com.mongodb.MongoClientOptions
getDescription() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the description for Mongo instances created with these options.
getDetails() - Method in class com.mongodb.BulkWriteError
Gets the details associated with this error.
getDetails() - Method in class com.mongodb.WriteConcernError
Gets the details associated with this error.
getDisableMD5() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Deprecated.
there is no replacement for this method, as MD5 is being removed
getDocumentClass() - Method in interface com.mongodb.client.MongoCollection
Get the class of documents stored in this collection.
getDuration() - Method in class com.mongodb.MapReduceOutput
Get the amount of time, in milliseconds, that it took to run this map reduce.
getEmitCount() - Method in class com.mongodb.MapReduceOutput
Get the number of messages emitted from the provided map function.
getEncoder() - Method in class com.mongodb.client.model.DBCollectionRemoveOptions
Returns the encoder
getEncoder() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Returns the encoder
getErrorMessage() - Method in class com.mongodb.CommandResult
Gets the error message associated with a failed command.
getException() - Method in class com.mongodb.CommandResult
Utility method to create an exception from a failed command.
getFileId() - Method in class com.mongodb.client.gridfs.GridFSUploadStream
Deprecated.
getFileList() - Method in class com.mongodb.gridfs.GridFS
Gets the list of files stored in this gridfs, sorted by filename.
getFileList(DBObject) - Method in class com.mongodb.gridfs.GridFS
Gets a filtered list of files stored in this gridfs, sorted by filename.
getFileList(DBObject, DBObject) - Method in class com.mongodb.gridfs.GridFS
Gets a sorted, filtered list of files stored in this gridfs.
getFilename() - Method in class com.mongodb.gridfs.GridFSFile
Gets the filename.
getFilesCollection() - Method in class com.mongodb.gridfs.GridFS
Gets the DBCollection in which the file's metadata is stored.
getFilter() - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Gets the selection query to determine the subset of documents from which to retrieve the distinct values
getFinalize() - Method in class com.mongodb.MapReduceCommand
Gets the Finalize JS Function
getFullName() - Method in class com.mongodb.DBCollection
Get the full name of a collection, with the database name as a prefix.
getGridFS() - Method in class com.mongodb.gridfs.GridFSFile
Gets the GridFS associated with this file
getGridFSFile() - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
Gets the corresponding GridFSFile for the file being downloaded
getHeartbeatConnectTimeout() - Method in class com.mongodb.MongoClientOptions
Gets the connect timeout for connections used for the cluster heartbeat.
getHeartbeatFrequency() - Method in class com.mongodb.MongoClientOptions
Gets the heartbeat frequency.
getHeartbeatSocketTimeout() - Method in class com.mongodb.MongoClientOptions
Gets the socket timeout for connections used for the cluster heartbeat.
getHint() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Gets the hint to apply.
getHint() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the hint for which index to use.
getHintFields() - Method in class com.mongodb.DBCollection
Deprecated.
getHintString() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Gets the hint string to apply.
getHosts() - Method in class com.mongodb.MongoClientURI
Gets the list of hosts
getHosts() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the list of hosts.
getId() - Method in class com.mongodb.BulkWriteUpsert
Gets the id of the upserted item.
getId() - Method in class com.mongodb.client.gridfs.GridFSUploadStream
Gets the BsonValue for the file to be uploaded
getId() - Method in class com.mongodb.gridfs.GridFSFile
Gets the id.
getIndex() - Method in class com.mongodb.BulkWriteError
The index of the item in the bulk write operation with this error.
getIndex() - Method in class com.mongodb.BulkWriteUpsert
Gets the index of the upserted item based on the order it was added to the bulk write operation.
getIndexInfo() - Method in class com.mongodb.DBCollection
Return a list of the indexes for this collection.
getInput() - Method in class com.mongodb.MapReduceCommand
Get the name of the collection the MapReduce will read from
getInputCount() - Method in class com.mongodb.MapReduceOutput
Get the number of documents that were input into the map reduce operation
getInputStream() - Method in class com.mongodb.gridfs.GridFSDBFile
Returns an InputStream from which data can be read.
getInsertedCount() - Method in class com.mongodb.BulkWriteResult
Returns the number of documents inserted by the write operation.
getInternalClass(String) - Method in class com.mongodb.DBCollection
Gets the internal class for the given path in the document hierarchy
getJsMode() - Method in class com.mongodb.MapReduceCommand
Gets the (optional) JavaScript mode
getKeysWanted() - Method in class com.mongodb.DBCursor
Gets the fields to be returned.
getLegacy() - Static method in class com.mongodb.util.JSONSerializers
Deprecated.
Returns an ObjectSerializer that mostly conforms to the strict JSON format defined in extended JSON, but with a few differences to keep compatibility with previous versions of the driver.
getLength() - Method in class com.mongodb.gridfs.GridFSFile
Gets the file's length.
getLimit() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Gets the limit to apply.
getLimit() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Gets the limit to apply.
getLimit() - Method in class com.mongodb.DBCursor
Gets the query limit.
getLimit() - Method in class com.mongodb.MapReduceCommand
Gets the (optional) limit on input
getLocalThreshold() - Method in class com.mongodb.MongoClientOptions
Gets the local threshold.
getMap() - Method in class com.mongodb.MapReduceCommand
Get the map function, as a JS String
getMaster() - Method in class com.mongodb.ReplicaSetStatus
Deprecated.
Gets the ServerAddress of the master server in this replica set.
getMatchedCount() - Method in class com.mongodb.BulkWriteResult
Returns the number of documents matched by updates or replacements in the write operation.
getMax() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the exclusive upper bound for a specific index.
getMaxAwaitTime(TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindOptions
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.
getMaxBsonObjectSize() - Method in class com.mongodb.Mongo
Deprecated.
getMaxBsonObjectSize() - Method in class com.mongodb.ReplicaSetStatus
Deprecated.
Gets the maximum size for a BSON object supported by the current master server.
getMaxConnectionIdleTime() - Method in class com.mongodb.MongoClientOptions
The maximum idle time of a pooled connection.
getMaxConnectionLifeTime() - Method in class com.mongodb.MongoClientOptions
The maximum life time of a pooled connection.
getMaxTime(TimeUnit) - Method in class com.mongodb.AggregationOptions
Gets the maximum execution time for the aggregation command.
getMaxTime(TimeUnit) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Gets the maximum execution time on the server for this operation.
getMaxTime(TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Gets the maximum execution time on the server for this operation.
getMaxTime(TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Gets the maximum execution time on the server for this operation.
getMaxTime(TimeUnit) - Method in class com.mongodb.MapReduceCommand
Gets the max execution time for this command, in the given time unit.
getMaxWaitTime() - Method in class com.mongodb.MongoClientOptions
The maximum wait time in milliseconds that a thread may wait for a connection to become available.
getMaxWaitTime() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the maximum wait time in milliseconds that a thread may wait for a connection to become available.
getMD5() - Method in class com.mongodb.gridfs.GridFSFile
Deprecated.
there is no replacement for this method
getMessage() - Method in class com.mongodb.BulkWriteError
Gets the message associated with this error.
getMessage() - Method in exception com.mongodb.util.JSONParseException
Deprecated.
 
getMessage() - Method in class com.mongodb.WriteConcernError
Gets the message associated with this error.
getMetaData() - Method in class com.mongodb.gridfs.GridFSFile
Gets the file metadata.
getMin() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the minimum inclusive lower bound for a specific index.
getMinConnectionsPerHost() - Method in class com.mongodb.MongoClientOptions
The minimum number of connections per host for this MongoClient instance.
getMinHeartbeatFrequency() - Method in class com.mongodb.MongoClientOptions
Gets the minimum heartbeat frequency.
getModifiedCount() - Method in class com.mongodb.BulkWriteResult
Returns the number of documents modified by the write operation.
getModifiers() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Deprecated.
use the individual setters instead
getMongo() - Method in class com.mongodb.DB
Deprecated.
getMongoClient() - Method in class com.mongodb.DB
Gets the MongoClient instance
getMongoClientOptions() - Method in class com.mongodb.MongoClient
Gets the options that this client uses to connect to server.
getMongoOptions() - Method in class com.mongodb.Mongo
Deprecated.
Please use MongoClient class to connect to server and corresponding MongoClient.getMongoClientOptions()
getN() - Method in class com.mongodb.WriteResult
Gets the "n" field, which contains the number of documents affected in the write operation.
getName() - Method in interface com.mongodb.client.MongoDatabase
Gets the name of the database.
getName() - Method in class com.mongodb.DB
Returns the name of this database.
getName() - Method in class com.mongodb.DBCollection
Get the name of a collection.
getName() - Method in class com.mongodb.ReplicaSetStatus
Deprecated.
Get the name of the replica set.
getNamespace() - Method in interface com.mongodb.client.MongoCollection
Gets the namespace of this collection.
getNumCursors() - Method in class com.mongodb.ParallelScanOptions
Deprecated.
Gets the number of cursors requested.
getObjectClass() - Method in class com.mongodb.DBCollection
Gets the default class for objects in the collection
getObjectId() - Method in class com.mongodb.client.gridfs.GridFSUploadStream
Gets the ObjectId for the file to be uploaded or throws an error if an alternative BsonType has been used for the id.
getObjectInstance(Object, Name, Context, Hashtable<?, ?>) - Method in class com.mongodb.client.jndi.MongoClientFactory
This implementation will create instances of MongoClient based on a connection string conforming to the format specified in MongoClientURI.
getObjectInstance(Object, Name, Context, Hashtable<?, ?>) - Method in class com.mongodb.client.MongoClientFactory
This implementation will create instances of MongoClient based on a connection string conforming to the format specified in ConnectionString.
getOptions() - Method in class com.mongodb.DB
Deprecated.
Replaced with DBCursor.getOptions()
getOptions() - Method in class com.mongodb.DBCollection
Deprecated.
Replaced with DBCursor.getOptions()
getOptions() - Method in class com.mongodb.DBCursor
Deprecated.
getOptions() - Method in class com.mongodb.Mongo
Deprecated.
Get options instead from instances of DBCursor
getOptions() - Method in class com.mongodb.MongoClientURI
Gets the options
getOptions() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the options.
getOutputCollection() - Method in class com.mongodb.MapReduceOutput
Gets the collection that holds the results (Will return null if results are Inline).
getOutputCount() - Method in class com.mongodb.MapReduceOutput
Get the number of documents generated as a result of this map reduce
getOutputDB() - Method in class com.mongodb.MapReduceCommand
Gets the (optional) database name where the output collection should reside
getOutputMode() - Method in class com.mongodb.AggregationOptions
Deprecated.
There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
getOutputStream() - Method in class com.mongodb.gridfs.GridFSInputFile
After retrieving this OutputStream, this object will be capable of accepting successively written data to the output stream.
getOutputTarget() - Method in class com.mongodb.MapReduceCommand
Gets the output target (name of collection to save to) This value is nullable only if OutputType is set to INLINE
getOutputType() - Method in class com.mongodb.MapReduceCommand
Gets the OutputType for this instance.
getPassword() - Method in class com.mongodb.MongoClientURI
Gets the password
getPassword() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the password.
getPinnedServerAddress() - Method in interface com.mongodb.client.ClientSession
Returns the server address of the pinned mongos on this session.
getProjection() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the projection
getProjection() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Gets a document describing the fields to return for all matching documents.
getQuery() - Method in class com.mongodb.DBCursor
Gets the query.
getQuery() - Method in class com.mongodb.MapReduceCommand
Gets the query to run for this MapReduce job
getReadConcern() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Get the read concern for the GridFSBucket.
getReadConcern() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Returns the readConcern
getReadConcern() - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Returns the readConcern
getReadConcern() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the readConcern
getReadConcern() - Method in interface com.mongodb.client.MongoCollection
Get the read concern for the MongoCollection.
getReadConcern() - Method in interface com.mongodb.client.MongoDatabase
Get the read concern for the MongoDatabase.
getReadConcern() - Method in class com.mongodb.DB
Get the read concern for this database.
getReadConcern() - Method in class com.mongodb.DBCollection
Get the read concern for this collection.
getReadConcern() - Method in class com.mongodb.Mongo
Deprecated.
Gets the read concern
getReadConcern() - Method in class com.mongodb.MongoClientOptions
The read concern to use.
getReadPreference() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Get the read preference for the GridFSBucket.
getReadPreference() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Returns the readPreference
getReadPreference() - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Returns the readPreference
getReadPreference() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the readPreference
getReadPreference() - Method in interface com.mongodb.client.MongoCollection
Get the read preference for the MongoCollection.
getReadPreference() - Method in interface com.mongodb.client.MongoDatabase
Get the read preference for the MongoDatabase.
getReadPreference() - Method in class com.mongodb.DB
Gets the read preference for this database.
getReadPreference() - Method in class com.mongodb.DBCollection
Gets the ReadPreference.
getReadPreference() - Method in class com.mongodb.DBCursor
Gets the default read preference.
getReadPreference() - Method in class com.mongodb.MapReduceCommand
Gets the read preference
getReadPreference() - Method in class com.mongodb.Mongo
Deprecated.
Gets the default read preference
getReadPreference() - Method in class com.mongodb.MongoClientOptions
The read preference to use for queries, map-reduce, aggregation, and count.
getReadPreference() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the read preference.
getReadPreference() - Method in class com.mongodb.ParallelScanOptions
Deprecated.
Gets the read preference to use.
getReduce() - Method in class com.mongodb.MapReduceCommand
Gets the reduce function, as a JS String
getRemovedCount() - Method in class com.mongodb.BulkWriteResult
Returns the number of documents removed by the write operation.
getReplicaSetStatus() - Method in class com.mongodb.Mongo
Deprecated.
getRequiredReplicaSetName() - Method in class com.mongodb.MongoClientOptions
Gets the required replica set name.
getRequiredReplicaSetName() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the required replica set name that this client should be connecting to.
getResumeToken() - Method in interface com.mongodb.client.MongoChangeStreamCursor
Returns the resume token.
getRetryReads() - Method in class com.mongodb.MongoClientOptions
Returns true if reads should be retried if they fail due to a network error or other retryable error.
getRetryWrites() - Method in class com.mongodb.MongoClientOptions
Returns true if writes should be retried if they fail due to a network error or other retryable error.
getScope() - Method in class com.mongodb.MapReduceCommand
Gets the (optional) JavaScript scope
getServerAddress() - Method in interface com.mongodb.client.MongoCursor
Returns the server address
getServerAddress() - Method in interface com.mongodb.Cursor
Gets the address of the server that data is pulled from.
getServerAddress() - Method in class com.mongodb.DBCursor
 
getServerAddressList() - Method in class com.mongodb.Mongo
Deprecated.
getServerCursor() - Method in interface com.mongodb.client.MongoCursor
Returns the server cursor, which can be null if the no cursor was created or if the cursor has been exhausted or killed.
getServerListeners() - Method in class com.mongodb.MongoClientOptions
Gets the list of added ServerListener.
getServerMonitorListeners() - Method in class com.mongodb.MongoClientOptions
Gets the list of added ServerMonitorListener.
getServerSelectionTimeout() - Method in class com.mongodb.MongoClientOptions
Gets the server selection timeout in milliseconds, which defines how long the driver will wait for server selection to succeed before throwing an exception.
getServerSelector() - Method in class com.mongodb.MongoClientOptions
Gets the server selector.
getSister(String) - Method in class com.mongodb.DBAddress
Deprecated.
Creates a DBAddress pointing to a different database on the same server.
getSisterDB(String) - Method in class com.mongodb.DB
Gets another database on same server
getSkip() - Method in class com.mongodb.client.model.DBCollectionCountOptions
Gets the number of documents to skip.
getSkip() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Gets the number of documents to skip.
getSocketFactory() - Method in class com.mongodb.MongoClientOptions
getSocketFactory() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the socket factory for creating sockets to mongod.
getSocketTimeout() - Method in class com.mongodb.MongoClientOptions
The socket timeout in milliseconds.
getSocketTimeout() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the socket timeout in milliseconds.
getSort() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the sort
getSort() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Gets the sort criteria to apply to the query.
getSort() - Method in class com.mongodb.MapReduceCommand
Gets the (optional) sort specification object
getSslContext() - Method in class com.mongodb.MongoClientOptions
Returns the SSLContext.
getStats() - Method in class com.mongodb.DB
Deprecated.
Prefer DB.command(DBObject) to run the dbStats command
getStats() - Method in class com.mongodb.DBCollection
The collStats command returns a variety of storage statistics for a given collection
getStrict() - Static method in class com.mongodb.util.JSONSerializers
Deprecated.
Returns an ObjectSerializer that conforms to the strict JSON format defined in extended JSON.
getThreadsAllowedToBlockForConnectionMultiplier() - Method in class com.mongodb.MongoClientOptions
Deprecated.
in the next major release, wait queue size limitations will be removed
getThreadsAllowedToBlockForConnectionMultiplier() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the multiplier which, when multiplied with the connectionsPerHost setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool.
getTransactionOptions() - Method in interface com.mongodb.client.ClientSession
Gets the transaction options.
getType(Object) - Static method in class com.mongodb.Bytes
Deprecated.
Gets the type byte for a given object.
getUpdate() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the update
getUploadDate() - Method in class com.mongodb.gridfs.GridFSFile
Gets the upload date.
getUpsertedId() - Method in class com.mongodb.WriteResult
Gets the _id value of an upserted document that resulted from this write.
getUpserts() - Method in class com.mongodb.BulkWriteResult
Gets an unmodifiable list of upserted items, or the empty list if there were none.
getURI() - Method in class com.mongodb.MongoClientURI
Get the unparsed URI.
getUsedDatabases() - Method in class com.mongodb.Mongo
Deprecated.
getUsername() - Method in class com.mongodb.MongoClientURI
Gets the username
getUsername() - Method in class com.mongodb.MongoURI
Deprecated.
Gets the username.
getUuidRepresentation() - Method in class com.mongodb.MongoClientOptions
Gets the UUID representation to use when encoding instances of UUID and when decoding BSON binary values with subtype of 3.
getW() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the "w" value, (number of writes), of the global WriteConcern.
getWrapper(Class) - Static method in class com.mongodb.ReflectionDBObject
Deprecated.
Returns an existing Wrapper instance associated with a class, or creates a new one.
getWrapperIfReflectionObject(Class) - Static method in class com.mongodb.ReflectionDBObject
Deprecated.
Returns the wrapper if this object can be assigned from this class.
getWriteConcern() - Method in interface com.mongodb.client.gridfs.GridFSBucket
Get the write concern for the GridFSBucket.
getWriteConcern() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the writeConcern
getWriteConcern() - Method in class com.mongodb.client.model.DBCollectionRemoveOptions
The write concern to use for the insertion.
getWriteConcern() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
The write concern to use for the insertion.
getWriteConcern() - Method in interface com.mongodb.client.MongoCollection
Get the write concern for the MongoCollection.
getWriteConcern() - Method in interface com.mongodb.client.MongoDatabase
Get the write concern for the MongoDatabase.
getWriteConcern() - Method in class com.mongodb.DB
Gets the write concern for this database.
getWriteConcern() - Method in class com.mongodb.DBCollection
Get the WriteConcern for this collection.
getWriteConcern() - Method in class com.mongodb.InsertOptions
The write concern to use for the insertion.
getWriteConcern() - Method in class com.mongodb.Mongo
Deprecated.
Gets the write concern
getWriteConcern() - Method in class com.mongodb.MongoClientOptions
The write concern to use.
getWriteConcern() - Method in class com.mongodb.MongoOptions
Deprecated.
Helper method to return the appropriate WriteConcern instance based on the current related options settings.
getWriteConcernError() - Method in exception com.mongodb.BulkWriteException
The write concern error, which may be null (in which case the list of errors will not be empty).
getWriteErrors() - Method in exception com.mongodb.BulkWriteException
The list of errors, which will not be null, but may be empty (if the write concern error is not null).
getWriteResult() - Method in exception com.mongodb.BulkWriteException
The result of all successfully processed write operations.
getWtimeout() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the "wtimeout" value of the global WriteConcern.
gotDBRef(String, String, ObjectId) - Method in class com.mongodb.DefaultDBCallback
 
greaterThan(Object) - Method in class com.mongodb.QueryBuilder
Equivalent to the $gt operator
greaterThanEquals(Object) - Method in class com.mongodb.QueryBuilder
Equivalent to the $gte operator
GridFS - Class in com.mongodb.gridfs
Implementation of GridFS - a specification for storing and retrieving files that exceed the BSON-document size limit of 16MB.
GridFS(DB) - Constructor for class com.mongodb.gridfs.GridFS
Creates a GridFS instance for the default bucket "fs" in the given database.
GridFS(DB, String) - Constructor for class com.mongodb.gridfs.GridFS
Creates a GridFS instance for the specified bucket in the given database.
GridFSBucket - Interface in com.mongodb.client.gridfs
Represents a GridFS Bucket
GridFSBuckets - Class in com.mongodb.client.gridfs
A factory for GridFSBucket instances.
GridFSDBFile - Class in com.mongodb.gridfs
This class enables retrieving a GridFS file metadata and content.
GridFSDBFile() - Constructor for class com.mongodb.gridfs.GridFSDBFile
 
GridFSDownloadStream - Class in com.mongodb.client.gridfs
A GridFS InputStream for downloading data from GridFS
GridFSDownloadStream() - Constructor for class com.mongodb.client.gridfs.GridFSDownloadStream
 
GridFSFile - Class in com.mongodb.gridfs
The abstract class representing a GridFS file.
GridFSFile() - Constructor for class com.mongodb.gridfs.GridFSFile
 
GridFSFindIterable - Interface in com.mongodb.client.gridfs
Iterable for the GridFS Files Collection.
GridFSInputFile - Class in com.mongodb.gridfs
This class represents a GridFS file to be written to the database.
GridFSInputFile(GridFS) - Constructor for class com.mongodb.gridfs.GridFSInputFile
Minimal constructor that does not rely on the presence of an InputStream.
GridFSInputFile(GridFS, InputStream, String) - Constructor for class com.mongodb.gridfs.GridFSInputFile
Default constructor setting the GridFS file name and providing an input stream containing data to be written to the file.
GridFSInputFile(GridFS, InputStream, String, boolean) - Constructor for class com.mongodb.gridfs.GridFSInputFile
Default constructor setting the GridFS file name and providing an input stream containing data to be written to the file.
GridFSInputFile(GridFS, String) - Constructor for class com.mongodb.gridfs.GridFSInputFile
Constructor that only provides a file name, but does not rely on the presence of an InputStream.
GridFSUploadStream - Class in com.mongodb.client.gridfs
A GridFS OutputStream for uploading data into GridFS
GridFSUploadStream() - Constructor for class com.mongodb.client.gridfs.GridFSUploadStream
 
group(DBObject, DBObject, DBObject, String) - Method in class com.mongodb.DBCollection
Deprecated.
The group command was deprecated in MongoDB 3.4
group(DBObject, DBObject, DBObject, String, String) - Method in class com.mongodb.DBCollection
Deprecated.
The group command was deprecated in MongoDB 3.4
group(DBObject, DBObject, DBObject, String, String, ReadPreference) - Method in class com.mongodb.DBCollection
Deprecated.
The group command was deprecated in MongoDB 3.4
group(GroupCommand) - Method in class com.mongodb.DBCollection
Deprecated.
The group command was deprecated in MongoDB 3.4
group(GroupCommand, ReadPreference) - Method in class com.mongodb.DBCollection
Deprecated.
The group command was deprecated in MongoDB 3.4
GroupCommand - Class in com.mongodb
Deprecated.
the group command was deprecated in MongoDB 3.4
GroupCommand(DBCollection, DBObject, DBObject, DBObject, String, String) - Constructor for class com.mongodb.GroupCommand
Deprecated.
Creates a new group command.
GroupCommand(DBCollection, DBObject, DBObject, DBObject, String, String, Collation) - Constructor for class com.mongodb.GroupCommand
Deprecated.
Creates a new group command.
GroupCommand(DBCollection, String, DBObject, DBObject, String, String) - Constructor for class com.mongodb.GroupCommand
Deprecated.
Creates a new group command.
GroupCommand(DBCollection, String, DBObject, DBObject, String, String, Collation) - Constructor for class com.mongodb.GroupCommand
Deprecated.
Creates a new group command.
GT - Static variable in class com.mongodb.QueryOperators
 
GTE - Static variable in class com.mongodb.QueryOperators
 

H

hasActiveTransaction() - Method in interface com.mongodb.client.ClientSession
Returns true if there is an active transaction on this session, and false otherwise
hashCode() - Method in class com.mongodb.BulkWriteError
 
hashCode() - Method in exception com.mongodb.BulkWriteException
 
hashCode() - Method in class com.mongodb.BulkWriteUpsert
 
hashCode() - Method in class com.mongodb.DBAddress
Deprecated.
 
hashCode() - Method in class com.mongodb.MongoClientOptions
 
hashCode() - Method in class com.mongodb.MongoClientURI
 
hashCode() - Method in class com.mongodb.MongoOptions
Deprecated.
 
hashCode() - Method in class com.mongodb.WriteConcernError
 
hasNext() - Method in interface com.mongodb.client.MongoCursor
 
hasNext() - Method in class com.mongodb.DBCursor
Checks if there is another object available.
heartbeatConnectTimeout(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the connect timeout for connections used for the cluster heartbeat.
heartbeatFrequency(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the heartbeat frequency.
heartbeatSocketTimeout(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the socket timeout for connections used for the cluster heartbeat.
hexMD5(byte[]) - Static method in class com.mongodb.util.Util
Deprecated.
Produce hex representation of the MD5 digest of a byte array.
hexMD5(ByteBuffer, int, int) - Static method in class com.mongodb.util.Util
Deprecated.
Produce hex representation of the MD5 digest of a byte array.
hint(DBObject) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the hint to apply.
hint(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the hint for which index to use.
hint(DBObject) - Method in class com.mongodb.DBCursor
Informs the database of indexed fields of the collection in order to improve performance.
hint(String) - Method in class com.mongodb.DBCursor
Deprecated.
hint(Bson) - Method in interface com.mongodb.client.AggregateIterable
Sets the hint for which index to use.
hint(Bson) - Method in interface com.mongodb.client.FindIterable
Sets the hint for which index to use.
HINT - Static variable in class com.mongodb.QueryOperators
Deprecated.
hintString(String) - Method in interface com.mongodb.client.FindIterable
Sets the hint to apply.
hintString(String) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the hint to apply.
Holder() - Constructor for class com.mongodb.Mongo.Holder
Deprecated.
 

I

ID_FIELD_NAME - Static variable in class com.mongodb.DBCollection
 
in(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $in operand
IN - Static variable in class com.mongodb.QueryOperators
 
initializeOrderedBulkOperation() - Method in class com.mongodb.DBCollection
Creates a builder for an ordered bulk write operation, consisting of an ordered collection of write requests, which can be any combination of inserts, updates, replaces, or removes.
initializeUnorderedBulkOperation() - Method in class com.mongodb.DBCollection
Creates a builder for an unordered bulk operation, consisting of an unordered collection of write requests, which can be any combination of inserts, updates, replaces, or removes.
INLINE - com.mongodb.AggregationOptions.OutputMode
Deprecated.
The output of the aggregate operation is returned inline.
INLINE - com.mongodb.MapReduceCommand.OutputType
Return results inline, no result is written to the DB server
insert(DBObject) - Method in class com.mongodb.BulkWriteOperation
Add an insert request to the bulk operation
insert(DBObject...) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(DBObject[], WriteConcern) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(DBObject[], WriteConcern, DBEncoder) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(DBObject, WriteConcern) - Method in class com.mongodb.DBCollection
Insert a document into a collection.
insert(WriteConcern, DBObject...) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(List<? extends DBObject>) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(List<? extends DBObject>, InsertOptions) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(List<? extends DBObject>, WriteConcern) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insert(List<? extends DBObject>, WriteConcern, DBEncoder) - Method in class com.mongodb.DBCollection
Insert documents into a collection.
insertMany(ClientSession, List<? extends TDocument>) - Method in interface com.mongodb.client.MongoCollection
Inserts one or more documents.
insertMany(ClientSession, List<? extends TDocument>, InsertManyOptions) - Method in interface com.mongodb.client.MongoCollection
Inserts one or more documents.
insertMany(List<? extends TDocument>) - Method in interface com.mongodb.client.MongoCollection
Inserts one or more documents.
insertMany(List<? extends TDocument>, InsertManyOptions) - Method in interface com.mongodb.client.MongoCollection
Inserts one or more documents.
insertOne(ClientSession, TDocument) - Method in interface com.mongodb.client.MongoCollection
Inserts the provided document.
insertOne(ClientSession, TDocument, InsertOneOptions) - Method in interface com.mongodb.client.MongoCollection
Inserts the provided document.
insertOne(TDocument) - Method in interface com.mongodb.client.MongoCollection
Inserts the provided document.
insertOne(TDocument, InsertOneOptions) - Method in interface com.mongodb.client.MongoCollection
Inserts the provided document.
InsertOptions - Class in com.mongodb
Options related to insertion of documents into MongoDB.
InsertOptions() - Constructor for class com.mongodb.InsertOptions
 
into(A) - Method in interface com.mongodb.client.MongoIterable
Iterates over all the documents, adding each to the given target.
is(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the find({key:value})
isAcknowledged() - Method in class com.mongodb.BulkWriteResult
Returns true if the write was acknowledged.
isAlwaysUseMBeans() - Method in class com.mongodb.MongoClientOptions
Deprecated.
there is no replacement for this property
isAlwaysUseMBeans() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater.
isCapped() - Method in class com.mongodb.DBCollection
Checks whether this collection is capped
isContinueOnError() - Method in class com.mongodb.InsertOptions
Whether documents will continue to be inserted after a failure to insert one (most commonly due to a duplicate key error).
isCursorFinalizerEnabled() - Method in class com.mongodb.MongoClientOptions
Gets whether there is a a finalize method created that cleans up instances of DBCursor that the client does not close.
isCursorFinalizerEnabled() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets whether there is a a finalize method created that cleans up instances of DBCursor that the client does not close.
isFsync() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the "fsync" value of the global WriteConcern.
isJ() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the "j" value of the global WriteConcern.
isLocked() - Method in class com.mongodb.Mongo
Deprecated.
isMaster(ServerAddress) - Method in class com.mongodb.ReplicaSetStatus
Deprecated.
Checks to see if a given server is the primary server in this replica set.
isModifiedCountAvailable() - Method in class com.mongodb.BulkWriteResult
Deprecated.
no longer needed since all supported server versions support modified count
isMulti() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Gets whether all documents matching the query filter will be removed.
isNoCursorTimeout() - Method in class com.mongodb.client.model.DBCollectionFindOptions
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
isOplogReplay() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Users should not set this under normal circumstances.
isOrdered() - Method in class com.mongodb.BulkWriteOperation
Returns true if this is building an ordered bulk write request.
isPartial() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
isPartialObject() - Method in class com.mongodb.gridfs.GridFSFile
 
isPartialObject() - Method in class com.mongodb.LazyDBList
 
isPartialObject() - Method in class com.mongodb.LazyDBObject
 
isPartialObject() - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
isRemove() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the remove
isReturnKey() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the returnKey.
isSafe() - Method in class com.mongodb.MongoOptions
Deprecated.
Returns whether the driver will use a WriteConcern of WriteConcern.ACKNOWLEDGED for all operations.
isShowRecordId() - Method in class com.mongodb.client.model.DBCollectionFindOptions
Returns the showRecordId.
isSocketKeepAlive() - Method in class com.mongodb.MongoClientOptions
Deprecated.
configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
isSocketKeepAlive() - Method in class com.mongodb.MongoOptions
Deprecated.
Gets the flag that controls the socket keep alive feature that keeps a connection alive through firewalls.
isSslEnabled() - Method in class com.mongodb.MongoClientOptions
Whether to use SSL.
isSslInvalidHostNameAllowed() - Method in class com.mongodb.MongoClientOptions
Returns whether invalid host names should be allowed if SSL is enabled.
isUpdateOfExisting() - Method in class com.mongodb.WriteResult
Returns true if this write resulted in an update of an existing document.
isUpsert() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the upsert
isUpsert() - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Returns true if a new document should be inserted if there are no matches to the query filter.
isVerbose() - Method in class com.mongodb.MapReduceCommand
Gets the verbosity of the MapReduce job.
itcount() - Method in class com.mongodb.DBCursor
For testing only! Iterates cursor and counts objects
iterator() - Method in interface com.mongodb.client.MongoIterable
 
iterator() - Method in class com.mongodb.DBCursor
Creates a copy of this cursor object that can be iterated.

J

j - Variable in class com.mongodb.MongoOptions
Deprecated.
The "j" value of the global WriteConcern.
jsMode(boolean) - Method in interface com.mongodb.client.MapReduceIterable
Sets the flag that specifies whether to convert intermediate data into BSON format between the execution of the map and reduce functions.
JSON - Class in com.mongodb.util
Deprecated.
This class has been superseded by to toJson and parse methods on BasicDBObject
JSON() - Constructor for class com.mongodb.util.JSON
Deprecated.
 
JSONCallback - Class in com.mongodb.util
Deprecated.
This class has been superseded by to toJson and parse methods on BasicDBObject
JSONCallback() - Constructor for class com.mongodb.util.JSONCallback
Deprecated.
 
JSONParseException - Exception in com.mongodb.util
Deprecated.
there is no replacement for this class
JSONParseException(String, int) - Constructor for exception com.mongodb.util.JSONParseException
Deprecated.
Creates a new instance.
JSONParseException(String, int, Throwable) - Constructor for exception com.mongodb.util.JSONParseException
Deprecated.
Creates a new instance.
JSONSerializers - Class in com.mongodb.util
Deprecated.
This class has been superseded by to toJson and parse methods on BasicDBObject

K

keySet() - Method in class com.mongodb.gridfs.GridFSFile
 
keySet() - Method in class com.mongodb.ReflectionDBObject.JavaWrapper
Deprecated.
Gets all the fields on this object.
keySet() - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 

L

LANGUAGE - Static variable in class com.mongodb.QueryOperators
 
LazyDBCallback - Class in com.mongodb
A BSONCallback for the creation of LazyDBObject and LazyDBList instances.
LazyDBCallback(DBCollection) - Constructor for class com.mongodb.LazyDBCallback
Construct an instance.
LazyDBDecoder - Class in com.mongodb
A decoder for LazyDBObject instances.
LazyDBDecoder() - Constructor for class com.mongodb.LazyDBDecoder
 
LazyDBEncoder - Class in com.mongodb
Encoder that only knows how to encode BSONObject instances of type LazyDBObject.
LazyDBEncoder() - Constructor for class com.mongodb.LazyDBEncoder
 
LazyDBList - Class in com.mongodb
A LazyDBObject representing a BSON array.
LazyDBList(byte[], int, LazyBSONCallback) - Constructor for class com.mongodb.LazyDBList
Construct an instance with the given raw bytes and offset.
LazyDBList(byte[], LazyBSONCallback) - Constructor for class com.mongodb.LazyDBList
Construct an instance with the given raw bytes and offset.
LazyDBObject - Class in com.mongodb
An immutable DBObject backed by a byte buffer that lazily provides keys and values on request.
LazyDBObject(byte[], int, LazyBSONCallback) - Constructor for class com.mongodb.LazyDBObject
Construct an instance.
LazyDBObject(byte[], LazyBSONCallback) - Constructor for class com.mongodb.LazyDBObject
Construct an instance.
legacyDefaults() - Method in class com.mongodb.MongoClientOptions.Builder
Deprecated.
there is no replacement for this method
length() - Method in class com.mongodb.DBCursor
Pulls back all items into an array and returns the number of objects.
lessThan(Object) - Method in class com.mongodb.QueryBuilder
Equivalent to the $lt operand
lessThanEquals(Object) - Method in class com.mongodb.QueryBuilder
Equivalent to the $lte operand
limit(int) - Method in interface com.mongodb.client.FindIterable
Sets the limit to apply.
limit(int) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the limit to apply.
limit(int) - Method in interface com.mongodb.client.MapReduceIterable
Sets the limit to apply.
limit(int) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the limit to apply.
limit(int) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the limit to apply.
limit(int) - Method in class com.mongodb.DBCursor
Limits the number of elements returned.
limit(long) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the limit to apply.
listCollectionNames() - Method in interface com.mongodb.client.MongoDatabase
Gets the names of all the collections in this database.
listCollectionNames(ClientSession) - Method in interface com.mongodb.client.MongoDatabase
Gets the names of all the collections in this database.
listCollections() - Method in interface com.mongodb.client.MongoDatabase
Finds all the collections in this database.
listCollections(ClientSession) - Method in interface com.mongodb.client.MongoDatabase
Finds all the collections in this database.
listCollections(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Finds all the collections in this database.
listCollections(Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Finds all the collections in this database.
ListCollectionsIterable<TResult> - Interface in com.mongodb.client
Iterable for ListCollections.
listDatabaseNames() - Method in interface com.mongodb.client.MongoClient
Get a list of the database names
listDatabaseNames() - Method in class com.mongodb.MongoClient
Get a list of the database names
listDatabaseNames(ClientSession) - Method in interface com.mongodb.client.MongoClient
Get a list of the database names
listDatabaseNames(ClientSession) - Method in class com.mongodb.MongoClient
Get a list of the database names
listDatabases() - Method in interface com.mongodb.client.MongoClient
Gets the list of databases
listDatabases() - Method in class com.mongodb.MongoClient
Gets the list of databases
listDatabases(ClientSession) - Method in interface com.mongodb.client.MongoClient
Gets the list of databases
listDatabases(ClientSession) - Method in class com.mongodb.MongoClient
Gets the list of databases
listDatabases(ClientSession, Class<T>) - Method in class com.mongodb.MongoClient
Gets the list of databases
listDatabases(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoClient
Gets the list of databases
listDatabases(Class<T>) - Method in class com.mongodb.MongoClient
Gets the list of databases
listDatabases(Class<TResult>) - Method in interface com.mongodb.client.MongoClient
Gets the list of databases
ListDatabasesIterable<TResult> - Interface in com.mongodb.client
Iterable for ListDatabases.
listIndexes() - Method in interface com.mongodb.client.MongoCollection
Get all the indexes in this collection.
listIndexes(ClientSession) - Method in interface com.mongodb.client.MongoCollection
Get all the indexes in this collection.
listIndexes(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Get all the indexes in this collection.
listIndexes(Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Get all the indexes in this collection.
ListIndexesIterable<TResult> - Interface in com.mongodb.client
Iterable for ListIndexes.
localThreshold(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the local threshold.
LT - Static variable in class com.mongodb.QueryOperators
 
LTE - Static variable in class com.mongodb.QueryOperators
 

M

main(String[]) - Static method in class com.mongodb.gridfs.CLI
Deprecated.
 
map(Function<TResult, U>) - Method in interface com.mongodb.client.MongoIterable
Maps this iterable from the source document type to the target document type.
mapReduce(ClientSession, String, String) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified map-reduce function.
mapReduce(ClientSession, String, String, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified map-reduce function.
mapReduce(MapReduceCommand) - Method in class com.mongodb.DBCollection
Allows you to run map-reduce aggregation operations over a collection.
mapReduce(String, String) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified map-reduce function.
mapReduce(String, String, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Aggregates documents according to the specified map-reduce function.
mapReduce(String, String, String, DBObject) - Method in class com.mongodb.DBCollection
Allows you to run map-reduce aggregation operations over a collection.
mapReduce(String, String, String, MapReduceCommand.OutputType, DBObject) - Method in class com.mongodb.DBCollection
Allows you to run map-reduce aggregation operations over a collection and saves to a named collection.
mapReduce(String, String, String, MapReduceCommand.OutputType, DBObject, ReadPreference) - Method in class com.mongodb.DBCollection
Allows you to run map-reduce aggregation operations over a collection and saves to a named collection.
MapReduceCommand - Class in com.mongodb
This class groups the argument for a map/reduce operation and can build the underlying command object
MapReduceCommand(DBCollection, String, String, String, MapReduceCommand.OutputType, DBObject) - Constructor for class com.mongodb.MapReduceCommand
Represents the command for a map reduce operation Runs the command in REPLACE output type to a named collection
MapReduceCommand.OutputType - Enum in com.mongodb
Represents the different options available for outputting the results of a map-reduce operation.
MapReduceIterable<TResult> - Interface in com.mongodb.client
Iterable for map-reduce.
MapReduceOutput - Class in com.mongodb
Represents the result of a map/reduce operation.
mark() - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
Marks the current position in this input stream.
markAsPartialObject() - Method in class com.mongodb.gridfs.GridFSFile
 
markAsPartialObject() - Method in class com.mongodb.LazyDBList
 
markAsPartialObject() - Method in class com.mongodb.LazyDBObject
 
markAsPartialObject() - Method in class com.mongodb.ReflectionDBObject
Deprecated.
ReflectionDBObjects can't be partial.
max(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the exclusive upper bound for a specific index.
max(DBObject) - Method in class com.mongodb.DBCursor
Specifies an exclusive upper limit for the index to use in a query.
max(Bson) - Method in interface com.mongodb.client.FindIterable
Sets the exclusive upper bound for a specific index.
MAX - Static variable in class com.mongodb.QueryOperators
Deprecated.
MAX_CHUNKSIZE - Static variable in class com.mongodb.gridfs.GridFS
Deprecated.
You can calculate max chunkSize with a similar formula Mongo.getMaxBsonObjectSize() - 500*1000. Please ensure that you left enough space for metadata (500kb is enough).
MAX_DISTANCE - Static variable in class com.mongodb.QueryOperators
 
MAX_SCAN - Static variable in class com.mongodb.QueryOperators
Deprecated.
maxAwaitTime(long, TimeUnit) - Method in interface com.mongodb.client.AggregateIterable
The maximum amount of time for the server to wait on new documents to satisfy a $changeStream aggregation.
maxAwaitTime(long, TimeUnit) - Method in interface com.mongodb.client.ChangeStreamIterable
Sets the maximum await execution time on the server for this operation.
maxAwaitTime(long, TimeUnit) - Method in interface com.mongodb.client.FindIterable
The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor query.
maxAwaitTime(long, TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the maximum await execution time on the server for this operation.
maxConnectionIdleTime(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the maximum idle time for a pooled connection.
maxConnectionLifeTime(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the maximum life time for a pooled connection.
maxScan(int) - Method in class com.mongodb.DBCursor
Deprecated.
Deprecated as of MongoDB 4.0 release
maxScan(long) - Method in interface com.mongodb.client.FindIterable
Deprecated.
Deprecated as of MongoDB 4.0 release
maxTime(long, TimeUnit) - Method in class com.mongodb.AggregationOptions.Builder
Sets the maximum execution time for the aggregation command.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.AggregateIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.DistinctIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.FindIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.ListCollectionsIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.ListDatabasesIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.ListIndexesIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in interface com.mongodb.client.MapReduceIterable
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the maximum execution time on the server for this operation.
maxTime(long, TimeUnit) - Method in class com.mongodb.DBCursor
Set the maximum execution time for operations on this cursor.
maxWaitTime - Variable in class com.mongodb.MongoOptions
Deprecated.
The maximum wait time in milliseconds that a thread may wait for a connection to become available.
maxWaitTime(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the maximum time that a thread will block waiting for a connection.
MERGE - com.mongodb.MapReduceCommand.OutputType
Merge the job output with the existing contents of outputTarget collection
min(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the minimum inclusive lower bound for a specific index.
min(DBObject) - Method in class com.mongodb.DBCursor
Specifies an inclusive lower limit for the index to use in a query.
min(Bson) - Method in interface com.mongodb.client.FindIterable
Sets the minimum inclusive lower bound for a specific index.
MIN - Static variable in class com.mongodb.QueryOperators
Deprecated.
minConnectionsPerHost(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the minimum number of connections per host.
minHeartbeatFrequency(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the minimum heartbeat frequency.
mod(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $mod operand
MOD - Static variable in class com.mongodb.QueryOperators
 
modifiers(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Deprecated.
use the individual setters instead
modifiers(Bson) - Method in interface com.mongodb.client.FindIterable
Deprecated.
use the individual setters instead
Mongo - Class in com.mongodb
Deprecated.
Replaced by MongoClient. Any non-deprecated methods will be moved to MongoClient. The rest will be removed along with this class.
Mongo() - Constructor for class com.mongodb.Mongo
Deprecated.
Replaced by MongoClient())
Mongo(MongoURI) - Constructor for class com.mongodb.Mongo
Deprecated.
Mongo(ServerAddress) - Constructor for class com.mongodb.Mongo
Deprecated.
Mongo(ServerAddress, MongoOptions) - Constructor for class com.mongodb.Mongo
Mongo(ServerAddress, ServerAddress) - Constructor for class com.mongodb.Mongo
Deprecated.
Please use MongoClient(java.util.List) instead.
Mongo(ServerAddress, ServerAddress, MongoOptions) - Constructor for class com.mongodb.Mongo
Deprecated.
Mongo(String) - Constructor for class com.mongodb.Mongo
Deprecated.
Mongo(String, int) - Constructor for class com.mongodb.Mongo
Deprecated.
Mongo(String, MongoOptions) - Constructor for class com.mongodb.Mongo
Mongo(List<ServerAddress>) - Constructor for class com.mongodb.Mongo
Deprecated.
Mongo(List<ServerAddress>, MongoOptions) - Constructor for class com.mongodb.Mongo
Mongo.Holder - Class in com.mongodb
Deprecated.
MongoChangeStreamCursor<TResult> - Interface in com.mongodb.client
The Mongo Cursor interface for change streams implementing the iterator protocol.
MongoClient - Class in com.mongodb
A MongoDB client with internal connection pooling.
MongoClient - Interface in com.mongodb.client
A client-side representation of a MongoDB cluster.
MongoClient() - Constructor for class com.mongodb.MongoClient
Creates an instance based on a (single) mongodb node (localhost, default port).
MongoClient(MongoClientURI) - Constructor for class com.mongodb.MongoClient
Creates a Mongo described by a URI.
MongoClient(MongoClientURI, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
Creates a Mongo described by a URI.
MongoClient(ServerAddress) - Constructor for class com.mongodb.MongoClient
Creates a Mongo instance based on a (single) mongodb node
MongoClient(ServerAddress, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress and default options.
MongoClient(ServerAddress, MongoCredential, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
Creates a Mongo instance based on a (single) mongo node using a given server address, credential, and options
MongoClient(ServerAddress, MongoCredential, MongoClientOptions, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
Creates a MongoClient to a single node using a given ServerAddress.
MongoClient(ServerAddress, List<MongoCredential>) - Constructor for class com.mongodb.MongoClient
MongoClient(ServerAddress, List<MongoCredential>, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
MongoClient(ServerAddress, List<MongoCredential>, MongoClientOptions, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
MongoClient(String) - Constructor for class com.mongodb.MongoClient
Creates a Mongo instance based on a (single) mongodb node.
MongoClient(String, int) - Constructor for class com.mongodb.MongoClient
Creates a Mongo instance based on a (single) mongodb node.
MongoClient(String, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
Creates a Mongo instance based on a (single) mongodb node (default port).
MongoClient(List<ServerAddress>) - Constructor for class com.mongodb.MongoClient
Creates an instance based on a list of replica set members or mongos servers.
MongoClient(List<ServerAddress>, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
Construct an instance based on a list of replica set members or mongos servers.
MongoClient(List<ServerAddress>, MongoCredential, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
Creates an instance based on a list of replica set members or mongos servers.
MongoClient(List<ServerAddress>, MongoCredential, MongoClientOptions, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
Creates a MongoClient
MongoClient(List<ServerAddress>, List<MongoCredential>) - Constructor for class com.mongodb.MongoClient
MongoClient(List<ServerAddress>, List<MongoCredential>, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
MongoClient(List<ServerAddress>, List<MongoCredential>, MongoClientOptions, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
MongoClientFactory - Class in com.mongodb.client.jndi
An ObjectFactory for MongoClient instances.
MongoClientFactory - Class in com.mongodb.client
A JNDI ObjectFactory for MongoClient instances.
MongoClientFactory() - Constructor for class com.mongodb.client.jndi.MongoClientFactory
 
MongoClientFactory() - Constructor for class com.mongodb.client.MongoClientFactory
 
MongoClientOptions - Class in com.mongodb
Various settings to control the behavior of a MongoClient.
MongoClientOptions.Builder - Class in com.mongodb
A builder for MongoClientOptions so that MongoClientOptions can be immutable, and to support easier construction through chaining.
MongoClients - Class in com.mongodb.client
A factory for MongoClient instances.
MongoClientURI - Class in com.mongodb
Represents a URI which can be used to create a MongoClient instance.
MongoClientURI(String) - Constructor for class com.mongodb.MongoClientURI
Creates a MongoURI from the given string.
MongoClientURI(String, MongoClientOptions.Builder) - Constructor for class com.mongodb.MongoClientURI
Creates a MongoURI from the given URI string, and MongoClientOptions.Builder.
MongoCollection<TDocument> - Interface in com.mongodb.client
The MongoCollection interface.
MongoCursor<TResult> - Interface in com.mongodb.client
The Mongo Cursor interface implementing the iterator protocol.
MongoDatabase - Interface in com.mongodb.client
The MongoDatabase interface.
MONGODB_PREFIX - Static variable in class com.mongodb.MongoURI
Deprecated.
The prefix for mongodb URIs.
MongoIterable<TResult> - Interface in com.mongodb.client
The MongoIterable is the results from an operation, such as a query.
MongoOptions - Class in com.mongodb
Deprecated.
Please use MongoClientOptions instead.
MongoOptions() - Constructor for class com.mongodb.MongoOptions
Deprecated.
MongoOptions(MongoClientOptions) - Constructor for class com.mongodb.MongoOptions
Deprecated.
MongoURI - Class in com.mongodb
Deprecated.
Replaced by MongoClientURI
MongoURI(MongoClientURI) - Constructor for class com.mongodb.MongoURI
Deprecated.
MongoURI(String) - Constructor for class com.mongodb.MongoURI
Deprecated.
multi(boolean) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Sets whether all documents matching the query filter will be removed.

N

nameOnly(Boolean) - Method in interface com.mongodb.client.ListDatabasesIterable
Sets the nameOnly flag that indicates whether the command should return just the database names or return the database names and size information.
NE - Static variable in class com.mongodb.QueryOperators
 
near(double, double) - Method in class com.mongodb.QueryBuilder
Equivalent of the $near operand
near(double, double, double) - Method in class com.mongodb.QueryBuilder
Equivalent of the $near operand
NEAR - Static variable in class com.mongodb.QueryOperators
 
NEAR_SPHERE - Static variable in class com.mongodb.QueryOperators
 
nearSphere(double, double) - Method in class com.mongodb.QueryBuilder
Equivalent of the $nearSphere operand
nearSphere(double, double, double) - Method in class com.mongodb.QueryBuilder
Equivalent of the $nearSphere operand
next() - Method in interface com.mongodb.client.MongoCursor
 
next() - Method in class com.mongodb.DBCursor
Returns the object the cursor is at and moves the cursor ahead by one.
NIN - Static variable in class com.mongodb.QueryOperators
 
noCursorTimeout(boolean) - Method in interface com.mongodb.client.FindIterable
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
noCursorTimeout(boolean) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
noCursorTimeout(boolean) - Method in class com.mongodb.client.model.DBCollectionFindOptions
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
noCursorTimeout(boolean) - Method in class com.mongodb.DBCursor
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
nonAtomic(boolean) - Method in interface com.mongodb.client.MapReduceIterable
Sets if the post-processing step will prevent MongoDB from locking the database.
NOR - Static variable in class com.mongodb.QueryOperators
 
not() - Method in class com.mongodb.QueryBuilder
Equivalent to $not meta operator.
NOT - Static variable in class com.mongodb.QueryOperators
 
notEquals(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $ne operand
notifyMessageSent() - Method in interface com.mongodb.client.ClientSession
Notify the client session that a message has been sent.
notIn(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $nin operand
numChunks() - Method in class com.mongodb.gridfs.GridFSFile
Returns the number of chunks that store the file data.
numCursors(int) - Method in class com.mongodb.ParallelScanOptions.Builder
Deprecated.
Set the requested number of cursors to iterate in parallel.
numSeen() - Method in class com.mongodb.DBCursor
Returns the number of objects through which the cursor has iterated.

O

objectDone() - Method in class com.mongodb.DefaultDBCallback
 
objectDone() - Method in class com.mongodb.util.JSONCallback
Deprecated.
 
ObjectSerializer - Interface in com.mongodb.util
Deprecated.
there is no replacement for this interface
objectStart(String) - Method in class com.mongodb.util.JSONCallback
Deprecated.
 
ok() - Method in class com.mongodb.CommandResult
Gets the "ok" field, which is whether this command executed correctly or not.
one() - Method in class com.mongodb.DBCursor
Returns the first document that matches the query.
openDownloadStream(ClientSession, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename.
openDownloadStream(ClientSession, String, GridFSDownloadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options.
openDownloadStream(ClientSession, BsonValue) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the stored file specified by id.
openDownloadStream(ClientSession, ObjectId) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the stored file specified by id.
openDownloadStream(String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the latest version of the stored file specified by the filename.
openDownloadStream(String, GridFSDownloadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the stored file specified by filename and the revision in options.
openDownloadStream(BsonValue) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the stored file specified by id.
openDownloadStream(ObjectId) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream from which the application can read the contents of the stored file specified by id.
openDownloadStreamByName(String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Deprecated.
openDownloadStreamByName(String, GridFSDownloadByNameOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
openUploadStream(ClientSession, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(ClientSession, String, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(ClientSession, BsonValue, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(ClientSession, BsonValue, String, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(ClientSession, ObjectId, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(String, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(BsonValue, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
openUploadStream(BsonValue, String, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Opens a Stream that the application can write the contents of the file to.
oplogReplay(boolean) - Method in interface com.mongodb.client.FindIterable
Users should not set this under normal circumstances.
oplogReplay(boolean) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Users should not set this under normal circumstances.
oplogReplay(boolean) - Method in class com.mongodb.DBCursor
Users should not set this under normal circumstances.
or(DBObject...) - Method in class com.mongodb.QueryBuilder
Equivalent to an $or operand
OR - Static variable in class com.mongodb.QueryOperators
 
ORDER - Static variable in class com.mongodb.Bytes
Deprecated.
Little-endian
ORDER_BY - Static variable in class com.mongodb.QueryOperators
Deprecated.
outputMode(AggregationOptions.OutputMode) - Method in class com.mongodb.AggregationOptions.Builder
Deprecated.
There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.

P

parallelScan(ParallelScanOptions) - Method in class com.mongodb.DBCollection
Deprecated.
the parallelCollectionScan command will be removed in MongoDB 4.2
ParallelScanOptions - Class in com.mongodb
Deprecated.
the parallelCollectionScan command will be removed in MongoDB 4.2
ParallelScanOptions.Builder - Class in com.mongodb
Deprecated.
A builder for the options
parse(String) - Static method in class com.mongodb.util.JSON
Deprecated.
Parses a JSON string and returns a corresponding Java object.
parse(String, BSONCallback) - Static method in class com.mongodb.util.JSON
Deprecated.
Parses a JSON string and constructs a corresponding Java object by calling the methods of a BSONCallback during parsing.
partial(boolean) - Method in interface com.mongodb.client.FindIterable
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
partial(boolean) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
partial(boolean) - Method in class com.mongodb.DBCursor
Get partial results from a sharded cluster if one or more shards are unreachable (instead of throwing an error).
POLYGON - Static variable in class com.mongodb.QueryOperators
 
projection(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the projection
projection(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets a document describing the fields to return for all matching documents.
projection(Bson) - Method in interface com.mongodb.client.FindIterable
Sets a document describing the fields to return for all matching documents.
put(String) - Method in class com.mongodb.QueryBuilder
Adds a new key to the query if not present yet.
put(String, Object) - Method in class com.mongodb.gridfs.GridFSFile
 
put(String, Object) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
putAll(Map) - Method in class com.mongodb.gridfs.GridFSFile
 
putAll(Map) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
putAll(BSONObject) - Method in class com.mongodb.gridfs.GridFSFile
 
putAll(BSONObject) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
putDBRef(String, DBRef) - Method in class com.mongodb.DefaultDBEncoder
Deals with encoding database references.
putSpecial(String, Object) - Method in class com.mongodb.DefaultDBEncoder
 

Q

QueryBuilder - Class in com.mongodb
Utility for creating DBObject queries
QueryBuilder() - Constructor for class com.mongodb.QueryBuilder
Creates a builder with an empty query
QueryOperators - Class in com.mongodb
MongoDB keywords for various query operations.
QUERYOPTION_AWAITDATA - Static variable in class com.mongodb.Bytes
Deprecated.
Use with TailableCursor.
QUERYOPTION_EXHAUST - Static variable in class com.mongodb.Bytes
Deprecated.
Stream the data down full blast in multiple "more" packages, on the assumption that the client will fully read all data queried.
QUERYOPTION_NOTIMEOUT - Static variable in class com.mongodb.Bytes
Deprecated.
The server normally times out idle cursors after an inactivity period (10 minutes) to prevent excess memory use.
QUERYOPTION_OPLOGREPLAY - Static variable in class com.mongodb.Bytes
Deprecated.
Internal replication use only - driver should not set
QUERYOPTION_PARTIAL - Static variable in class com.mongodb.Bytes
Deprecated.
Use with sharding (mongos).
QUERYOPTION_SLAVEOK - Static variable in class com.mongodb.Bytes
Deprecated.
When turned on, read queries will be directed to slave servers instead of the primary server.
QUERYOPTION_TAILABLE - Static variable in class com.mongodb.Bytes
Deprecated.
Tailable means cursor is not closed when the last data is retrieved.

R

read() - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 
read(byte[]) - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 
read(byte[], int, int) - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 
readConcern(ReadConcern) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the readConcern
readConcern(ReadConcern) - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Sets the readConcern
readConcern(ReadConcern) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the readConcern
readConcern(ReadConcern) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the read concern.
readObject(InputStream) - Method in class com.mongodb.LazyDBDecoder
 
readPreference - Variable in class com.mongodb.MongoOptions
Deprecated.
Specifies the read preference.
readPreference(ReadPreference) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the readPreference
readPreference(ReadPreference) - Method in class com.mongodb.client.model.DBCollectionDistinctOptions
Sets the readPreference
readPreference(ReadPreference) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the readPreference
readPreference(ReadPreference) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the read preference.
readPreference(ReadPreference) - Method in class com.mongodb.ParallelScanOptions.Builder
Deprecated.
The read preference to use.
REDUCE - com.mongodb.MapReduceCommand.OutputType
Reduce the job output with the existing contents of outputTarget collection
ReflectionDBObject - Class in com.mongodb
Deprecated.
Replaced by PojoCodecProvider
ReflectionDBObject() - Constructor for class com.mongodb.ReflectionDBObject
Deprecated.
 
ReflectionDBObject.JavaWrapper - Class in com.mongodb
Deprecated.
Represents a wrapper around the DBObject to interface with the Class fields
regex(Pattern) - Method in class com.mongodb.QueryBuilder
Passes a regular expression for a query
remove() - Method in class com.mongodb.BulkWriteRequestBuilder
Adds a request to remove all documents in the collection that match the query with which this builder was created.
remove() - Method in class com.mongodb.DBCursor
 
remove(boolean) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the remove
remove(DBObject) - Method in class com.mongodb.DBCollection
Remove documents from a collection.
remove(DBObject) - Method in class com.mongodb.gridfs.GridFS
Removes all files matching the given query.
remove(DBObject, DBCollectionRemoveOptions) - Method in class com.mongodb.DBCollection
Remove documents from a collection.
remove(DBObject, WriteConcern) - Method in class com.mongodb.DBCollection
Remove documents from a collection.
remove(DBObject, WriteConcern, DBEncoder) - Method in class com.mongodb.DBCollection
Remove documents from a collection.
remove(String) - Method in class com.mongodb.gridfs.GridFS
Removes all files matching the given filename.
remove(ObjectId) - Method in class com.mongodb.gridfs.GridFS
Removes the file matching the given id.
removeField(String) - Method in class com.mongodb.gridfs.GridFSFile
 
removeField(String) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
This operation is not supported.
removeOne() - Method in class com.mongodb.BulkWriteRequestBuilder
Adds a request to remove one document in the collection that matches the query with which this builder was created.
removeUser(String) - Method in class com.mongodb.DB
Deprecated.
Use DB.command to call the dropUser command
rename(ClientSession, BsonValue, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Renames the stored file with the specified id.
rename(ClientSession, ObjectId, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Renames the stored file with the specified id.
rename(String) - Method in class com.mongodb.DBCollection
Change the name of an existing collection.
rename(String, boolean) - Method in class com.mongodb.DBCollection
Change the name of an existing collection.
rename(BsonValue, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Renames the stored file with the specified id.
rename(ObjectId, String) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Renames the stored file with the specified id.
renameCollection(ClientSession, MongoNamespace) - Method in interface com.mongodb.client.MongoCollection
Rename the collection with oldCollectionName to the newCollectionName.
renameCollection(ClientSession, MongoNamespace, RenameCollectionOptions) - Method in interface com.mongodb.client.MongoCollection
Rename the collection with oldCollectionName to the newCollectionName.
renameCollection(MongoNamespace) - Method in interface com.mongodb.client.MongoCollection
Rename the collection with oldCollectionName to the newCollectionName.
renameCollection(MongoNamespace, RenameCollectionOptions) - Method in interface com.mongodb.client.MongoCollection
Rename the collection with oldCollectionName to the newCollectionName.
REPLACE - com.mongodb.MapReduceCommand.OutputType
Save the job output to a collection, replacing its previous content
replaceOne(ClientSession, Bson, TDocument) - Method in interface com.mongodb.client.MongoCollection
Replace a document in the collection according to the specified arguments.
replaceOne(ClientSession, Bson, TDocument, ReplaceOptions) - Method in interface com.mongodb.client.MongoCollection
Replace a document in the collection according to the specified arguments.
replaceOne(ClientSession, Bson, TDocument, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
replaceOne(DBObject) - Method in class com.mongodb.BulkUpdateRequestBuilder
Adds a request to replace one document in the collection that matches the query with which this builder was created.
replaceOne(DBObject) - Method in class com.mongodb.BulkWriteRequestBuilder
Adds a request to replace one document in the collection that matches the query with which this builder was created.
replaceOne(Bson, TDocument) - Method in interface com.mongodb.client.MongoCollection
Replace a document in the collection according to the specified arguments.
replaceOne(Bson, TDocument, ReplaceOptions) - Method in interface com.mongodb.client.MongoCollection
Replace a document in the collection according to the specified arguments.
replaceOne(Bson, TDocument, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
ReplicaSetStatus - Class in com.mongodb
requiredReplicaSetName(String) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the required replica set name for the cluster.
reset() - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 
reset() - Method in class com.mongodb.MongoOptions
Deprecated.
Reset all settings to the default.
resetOptions() - Method in class com.mongodb.DB
Deprecated.
resetOptions() - Method in class com.mongodb.DBCollection
Deprecated.
resetOptions() - Method in class com.mongodb.DBCursor
Deprecated.
resetOptions() - Method in class com.mongodb.Mongo
Deprecated.
Reset options instead on instances of DBCursor
RESULTFLAG_AWAITCAPABLE - Static variable in class com.mongodb.Bytes
Deprecated.
Set when the server supports the AwaitData Query option.
RESULTFLAG_CURSORNOTFOUND - Static variable in class com.mongodb.Bytes
Deprecated.
Set when getMore is called but the cursor id is not valid at the server.
RESULTFLAG_ERRSET - Static variable in class com.mongodb.Bytes
Deprecated.
Set when query failed.
RESULTFLAG_SHARDCONFIGSTALE - Static variable in class com.mongodb.Bytes
Deprecated.
Drivers should ignore this.
results() - Method in class com.mongodb.AggregationOutput
Deprecated.
Returns the results of the aggregation.
results() - Method in class com.mongodb.MapReduceOutput
Returns an iterable containing the results of the operation.
resumeAfter(BsonDocument) - Method in interface com.mongodb.client.ChangeStreamIterable
Sets the logical starting point for the new change stream.
retryReads(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Sets whether reads should be retried if they fail due to a network error.
retryWrites(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Sets whether writes should be retried if they fail due to a network error.
RETURN_KEY - Static variable in class com.mongodb.QueryOperators
Deprecated.
returnKey() - Method in class com.mongodb.DBCursor
Forces the cursor to only return fields included in the index.
returnKey(boolean) - Method in interface com.mongodb.client.FindIterable
Sets the returnKey.
returnKey(boolean) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the returnKey.
returnNew() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Returns the returnNew
returnNew(boolean) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the returnNew
runCommand(ClientSession, Bson) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with a read preference of ReadPreference.primary().
runCommand(ClientSession, Bson, ReadPreference) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with the given read preference.
runCommand(ClientSession, Bson, ReadPreference, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with the given read preference.
runCommand(ClientSession, Bson, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with a read preference of ReadPreference.primary().
runCommand(Bson) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with a read preference of ReadPreference.primary().
runCommand(Bson, ReadPreference) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with the given read preference.
runCommand(Bson, ReadPreference, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with the given read preference.
runCommand(Bson, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Executes the given command in the context of the current database with a read preference of ReadPreference.primary().

S

safe - Variable in class com.mongodb.MongoOptions
Deprecated.
If true the driver will use a WriteConcern of WriteConcern.SAFE for all operations.
save() - Method in class com.mongodb.gridfs.GridFSFile
Saves the file entry to the files collection
save() - Method in class com.mongodb.gridfs.GridFSInputFile
Calls GridFSInputFile.save(long) with the existing chunk size.
save(long) - Method in class com.mongodb.gridfs.GridFSInputFile
This method first calls saveChunks(long) if the file data has not been saved yet.
save(DBObject) - Method in class com.mongodb.DBCollection
Update an existing document or insert a document depending on the parameter.
save(DBObject, WriteConcern) - Method in class com.mongodb.DBCollection
Update an existing document or insert a document depending on the parameter.
saveChunks() - Method in class com.mongodb.gridfs.GridFSInputFile
Saves all data into chunks from configured InputStream input stream to GridFS.
saveChunks(long) - Method in class com.mongodb.gridfs.GridFSInputFile
Saves all data into chunks from configured InputStream input stream to GridFS.
scope(Bson) - Method in interface com.mongodb.client.MapReduceIterable
Sets the global variables that are accessible in the map, reduce and finalize functions.
SEARCH - Static variable in class com.mongodb.QueryOperators
 
serialize(Object) - Static method in class com.mongodb.util.JSON
Deprecated.
Serializes an object into its JSON form.
serialize(Object) - Method in interface com.mongodb.util.ObjectSerializer
Deprecated.
Serializes obj.
serialize(Object, StringBuilder) - Static method in class com.mongodb.util.JSON
Deprecated.
Serializes an object into its JSON form.
serialize(Object, StringBuilder) - Method in interface com.mongodb.util.ObjectSerializer
Deprecated.
Serializes obj into buf.
serverSelectionTimeout(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the server selection timeout in milliseconds, which defines how long the driver will wait for server selection to succeed before throwing an exception.
serverSelector(ServerSelector) - Method in class com.mongodb.MongoClientOptions.Builder
Sets a server selector that augments the normal server selection rules applied by the driver when determining which server to send an operation to.
set(ReflectionDBObject, String, Object) - Method in class com.mongodb.ReflectionDBObject.JavaWrapper
Deprecated.
Adds or sets the given field to the given value on the document.
set_id(Object) - Method in class com.mongodb.ReflectionDBObject
Deprecated.
Sets the _id
setAlwaysUseMBeans(boolean) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater.
setBypassDocumentValidation(Boolean) - Method in class com.mongodb.BulkWriteOperation
Sets whether to bypass document validation.
setBypassDocumentValidation(Boolean) - Method in class com.mongodb.MapReduceCommand
Sets whether to bypass document validation.
setChunkSize(long) - Method in class com.mongodb.gridfs.GridFSInputFile
Set the chunk size.
setCollation(Collation) - Method in class com.mongodb.DBCursor
Sets the collation options
setCollation(Collation) - Method in class com.mongodb.MapReduceCommand
Sets the collation options
setConnectionsPerHost(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the maximum number of connections allowed per host for this Mongo instance.
setConnectTimeout(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the connection timeout in milliseconds.
setContentType(String) - Method in class com.mongodb.gridfs.GridFSInputFile
Sets the content type (MIME type) on the GridFS entry.
setCursorFinalizerEnabled(boolean) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets whether there is a a finalize method created that cleans up instances of DBCursor that the client does not close.
setDbDecoderFactory(DBDecoderFactory) - Method in class com.mongodb.MongoOptions
Deprecated.
Override the DBCallback factory.
setDBDecoderFactory(DBDecoderFactory) - Method in class com.mongodb.DBCollection
Set a custom decoder factory for this collection.
setDbEncoderFactory(DBEncoderFactory) - Method in class com.mongodb.MongoOptions
Deprecated.
Override the encoding factory.
setDBEncoderFactory(DBEncoderFactory) - Method in class com.mongodb.DBCollection
Set a custom encoder factory for this collection.
setDecoderFactory(DBDecoderFactory) - Method in class com.mongodb.DBCursor
Sets the factory that will be used create a DBDecoder that will be used to decode BSON documents into DBObject instances.
setDescription(String) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the description for Mongo instances created with these options.
setFilename(String) - Method in class com.mongodb.gridfs.GridFSInputFile
Sets the file name on the GridFS entry.
setFinalize(String) - Method in class com.mongodb.MapReduceCommand
Sets the Finalize JS Function
setFsync(boolean) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the "fsync" value of the global WriteConcern.
setGridFS(GridFS) - Method in class com.mongodb.gridfs.GridFSFile
Sets the GridFS associated with this file.
setHintFields(List<? extends DBObject>) - Method in class com.mongodb.DBCollection
Deprecated.
setId(Object) - Method in class com.mongodb.gridfs.GridFSInputFile
Sets the ID of this GridFS file.
setInternalClass(String, Class<? extends DBObject>) - Method in class com.mongodb.DBCollection
Sets the internal class for the given path in the document hierarchy
setJ(boolean) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the "j" value of the global WriteConcern.
setJsMode(Boolean) - Method in class com.mongodb.MapReduceCommand
Sets the (optional) JavaScript Mode
setLimit(int) - Method in class com.mongodb.MapReduceCommand
Sets the (optional) limit on input
setMaxTime(long, TimeUnit) - Method in class com.mongodb.MapReduceCommand
Sets the max execution time for this command, in the given time unit.
setMaxWaitTime(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the maximum wait time in milliseconds that a thread may wait for a connection to become available.
setMetaData(DBObject) - Method in class com.mongodb.gridfs.GridFSFile
Gets the file metadata.
setObjectClass(Class<? extends DBObject>) - Method in class com.mongodb.DBCollection
Sets a default class for objects in this collection; null resets the class to nothing.
setOptions(int) - Method in class com.mongodb.DB
Deprecated.
setOptions(int) - Method in class com.mongodb.DBCollection
Deprecated.
setOptions(int) - Method in class com.mongodb.DBCursor
Deprecated.
setOptions(int) - Method in class com.mongodb.Mongo
Deprecated.
Set options on instances of DBCursor
setOutputDB(String) - Method in class com.mongodb.MapReduceCommand
Sets the (optional) database name where the output collection should reside
setPinnedServerAddress(ServerAddress) - Method in interface com.mongodb.client.ClientSession
Pin the server address of the mongos on this session.
setReadConcern(ReadConcern) - Method in class com.mongodb.DB
Sets the read concern for this database.
setReadConcern(ReadConcern) - Method in class com.mongodb.DBCollection
Sets the read concern for this collection.
setReadPreference(ReadPreference) - Method in class com.mongodb.DB
Sets the read preference for this database.
setReadPreference(ReadPreference) - Method in class com.mongodb.DBCollection
Sets the ReadPreference for this collection.
setReadPreference(ReadPreference) - Method in class com.mongodb.DBCursor
Sets the read preference for this cursor.
setReadPreference(ReadPreference) - Method in class com.mongodb.MapReduceCommand
Sets the read preference for this command.
setReadPreference(ReadPreference) - Method in class com.mongodb.Mongo
Deprecated.
Set the default read preference with either MongoClientURI or MongoClientOptions
setReadPreference(ReadPreference) - Method in class com.mongodb.MongoOptions
Deprecated.
Specifies the read preference.
setSafe(boolean) - Method in class com.mongodb.MongoOptions
Deprecated.
If true the driver will use a WriteConcern of WriteConcern.SAFE for all operations.
setScope(Map<String, Object>) - Method in class com.mongodb.MapReduceCommand
Sets the (optional) JavaScript scope
setSocketFactory(SocketFactory) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the socket factory for creating sockets to mongod.
setSocketKeepAlive(boolean) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the flag that controls the socket keep alive feature that keeps a connection alive through firewalls Socket.setKeepAlive(boolean) Default is false.
setSocketTimeout(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the socket timeout in milliseconds It is used for I/O socket read and write operations (int) Default is 0 and means no timeout.
setSort(DBObject) - Method in class com.mongodb.MapReduceCommand
Sets the (optional) sort specification object
setThreadsAllowedToBlockForConnectionMultiplier(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the multiplier which, when multiplied with the connectionsPerHost setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool.
setVerbose(Boolean) - Method in class com.mongodb.MapReduceCommand
Sets the verbosity of the MapReduce job, defaults to 'true'
setW(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the "w" value, (number of writes), of the global WriteConcern.
setWriteConcern(WriteConcern) - Method in class com.mongodb.DB
Sets the write concern for this database.
setWriteConcern(WriteConcern) - Method in class com.mongodb.DBCollection
Set the WriteConcern for this collection.
setWriteConcern(WriteConcern) - Method in class com.mongodb.Mongo
Deprecated.
Set the default write concern with either MongoClientURI or MongoClientOptions
setWriteConcern(WriteConcern) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the write concern.
setWtimeout(int) - Method in class com.mongodb.MongoOptions
Deprecated.
Sets the "wtimeout" value of the global WriteConcern.
sharded(boolean) - Method in interface com.mongodb.client.MapReduceIterable
Sets if the output database is sharded
SHOW_DISK_LOC - Static variable in class com.mongodb.QueryOperators
Deprecated.
showDiskLoc() - Method in class com.mongodb.DBCursor
Deprecated.
showDiskLoc has been deprecated in the MongoDB server. There is no replacement for it.
showRecordId(boolean) - Method in interface com.mongodb.client.FindIterable
Sets the showRecordId.
showRecordId(boolean) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the showRecordId.
singleton() - Static method in class com.mongodb.Mongo.Holder
Deprecated.
Get the only instance of Holder.
size() - Method in class com.mongodb.DBCursor
Counts the number of objects matching the query this does take limit/skip into consideration
size(Object) - Method in class com.mongodb.QueryBuilder
Equivalent of the $size operand
SIZE - Static variable in class com.mongodb.QueryOperators
 
skip(int) - Method in interface com.mongodb.client.FindIterable
Sets the number of documents to skip.
skip(int) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the number of documents to skip.
skip(int) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the number of documents to skip.
skip(int) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the number of documents to skip.
skip(int) - Method in class com.mongodb.DBCursor
Discards a given number of elements at the beginning of the cursor.
skip(long) - Method in class com.mongodb.client.gridfs.GridFSDownloadStream
 
skip(long) - Method in class com.mongodb.client.model.DBCollectionCountOptions
Sets the number of documents to skip.
slaveOk() - Method in class com.mongodb.DB
Deprecated.
Replaced with ReadPreference.secondaryPreferred()
slaveOk() - Method in class com.mongodb.DBCollection
Deprecated.
Replaced with ReadPreference.secondaryPreferred()
slaveOk() - Method in class com.mongodb.DBCursor
Deprecated.
Replaced with ReadPreference.secondaryPreferred()
slaveOk() - Method in class com.mongodb.Mongo
Deprecated.
Replaced with ReadPreference.secondaryPreferred()
snapshot() - Method in class com.mongodb.DBCursor
Deprecated.
Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
snapshot(boolean) - Method in interface com.mongodb.client.FindIterable
Deprecated.
Deprecated in MongoDB 3.6 release and removed in MongoDB 4.0 release
SNAPSHOT - Static variable in class com.mongodb.QueryOperators
Deprecated.
socketFactory - Variable in class com.mongodb.MongoOptions
Deprecated.
Sets the socket factory for creating sockets to mongod Default is SocketFactory.getDefault()
socketFactory(SocketFactory) - Method in class com.mongodb.MongoClientOptions.Builder
socketKeepAlive - Variable in class com.mongodb.MongoOptions
Deprecated.
This flag controls the socket keep alive feature that keeps a connection alive through firewalls Socket.setKeepAlive(boolean) Default is false.
socketKeepAlive(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Deprecated.
configuring keep-alive has been deprecated. It now defaults to true and disabling it is not recommended.
socketTimeout - Variable in class com.mongodb.MongoOptions
Deprecated.
The socket timeout in milliseconds It is used for I/O socket read and write operations Socket.setSoTimeout(int) Default is 0 and means no timeout.
socketTimeout(int) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the socket timeout.
sort(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the sort
sort(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindOptions
Sets the sort criteria to apply to the query.
sort(DBObject) - Method in class com.mongodb.DBCursor
Sorts this cursor's elements.
sort(Bson) - Method in interface com.mongodb.client.FindIterable
Sets the sort criteria to apply to the query.
sort(Bson) - Method in interface com.mongodb.client.gridfs.GridFSFindIterable
Sets the sort criteria to apply to the query.
sort(Bson) - Method in interface com.mongodb.client.MapReduceIterable
Sets the sort criteria to apply to the query.
sslContext(SSLContext) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the SSLContext to be used with SSL is enabled.
sslEnabled(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Sets whether to use SSL.
sslInvalidHostNameAllowed(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
Define whether invalid host names should be allowed.
start() - Static method in class com.mongodb.QueryBuilder
Returns a new QueryBuilder.
start(String) - Static method in class com.mongodb.QueryBuilder
Creates a new query with a document key
startAfter(BsonDocument) - Method in interface com.mongodb.client.ChangeStreamIterable
Similar to resumeAfter, this option takes a resume token and starts a new change stream returning the first notification after the token.
startAtOperationTime(BsonTimestamp) - Method in interface com.mongodb.client.ChangeStreamIterable
The change stream will only provide changes that occurred at or after the specified timestamp.
startSession() - Method in interface com.mongodb.client.MongoClient
Creates a client session with default options.
startSession() - Method in class com.mongodb.MongoClient
Creates a client session with default session options.
startSession(ClientSessionOptions) - Method in interface com.mongodb.client.MongoClient
Creates a client session.
startSession(ClientSessionOptions) - Method in class com.mongodb.MongoClient
Creates a client session.
startTransaction() - Method in interface com.mongodb.client.ClientSession
Start a transaction in the context of this session with default transaction options.
startTransaction(TransactionOptions) - Method in interface com.mongodb.client.ClientSession
Start a transaction in the context of this session with the given transaction options.

T

text(String) - Method in class com.mongodb.QueryBuilder
Equivalent to a $text operand.
text(String, String) - Method in class com.mongodb.QueryBuilder
Equivalent to a $text operand.
TEXT - Static variable in class com.mongodb.QueryOperators
 
threadsAllowedToBlockForConnectionMultiplier - Variable in class com.mongodb.MongoOptions
Deprecated.
This multiplier, multiplied with the connectionsPerHost setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool.
threadsAllowedToBlockForConnectionMultiplier(int) - Method in class com.mongodb.MongoClientOptions.Builder
Deprecated.
in the next major release, wait queue size limitations will be removed
throwOnError() - Method in class com.mongodb.CommandResult
Throws a CommandFailureException if the command failed.
toArray() - Method in class com.mongodb.DBCursor
Converts this cursor to an array.
toArray(int) - Method in class com.mongodb.DBCursor
Converts this cursor to an array.
toCollection() - Method in interface com.mongodb.client.AggregateIterable
Aggregates documents according to the specified aggregation pipeline, which must end with a $out or $merge stage.
toCollection() - Method in interface com.mongodb.client.MapReduceIterable
Aggregates documents to a collection according to the specified map-reduce function with the given options, which must specify a non-inline result.
toDBObject() - Method in class com.mongodb.GroupCommand
Deprecated.
Turns this group command into the DBObject format of the command.
toDBObject() - Method in class com.mongodb.MapReduceCommand
Turns this command into a DBObject representation of this map reduce command.
toHex(byte[]) - Static method in class com.mongodb.util.Util
Deprecated.
Converts the given byte buffer to a hexadecimal string using Integer.toHexString(int).
toMap() - Method in class com.mongodb.gridfs.GridFSFile
 
toMap() - Method in class com.mongodb.ReflectionDBObject
Deprecated.
 
toString() - Method in class com.mongodb.AggregationOptions
 
toString() - Method in class com.mongodb.BulkWriteError
 
toString() - Method in class com.mongodb.BulkWriteUpsert
 
toString() - Method in class com.mongodb.DB
 
toString() - Method in class com.mongodb.DBAddress
Deprecated.
Gets a String representation of address as host:port/databaseName.
toString() - Method in class com.mongodb.DBCollection
 
toString() - Method in class com.mongodb.DBCursor
 
toString() - Method in class com.mongodb.DefaultDBDecoder
 
toString() - Method in class com.mongodb.DefaultDBEncoder
 
toString() - Method in class com.mongodb.gridfs.GridFSFile
 
toString() - Method in class com.mongodb.LazyDBList
Deprecated.
there is no replacement for this method, as the driver no longer supports generating top-level JSON arrays. To encode an instance of this class to JSON it must be embedded inside a document.
toString() - Method in class com.mongodb.LazyDBObject
Returns a JSON serialization of this object
toString() - Method in class com.mongodb.MapReduceCommand
 
toString() - Method in class com.mongodb.MapReduceOutput
 
toString() - Method in class com.mongodb.Mongo
Deprecated.
 
toString() - Method in class com.mongodb.MongoClientOptions
 
toString() - Method in class com.mongodb.MongoClientURI
 
toString() - Method in class com.mongodb.MongoOptions
Deprecated.
 
toString() - Method in class com.mongodb.MongoURI
Deprecated.
 
toString() - Method in class com.mongodb.ReplicaSetStatus
Deprecated.
 
toString() - Method in class com.mongodb.WriteConcernError
 
toString() - Method in class com.mongodb.WriteResult
 
TransactionBody<T> - Interface in com.mongodb.client
A functional interface representing the body of a transaction.
tryNext() - Method in interface com.mongodb.client.MongoCursor
A special next() case that returns the next element in the iteration if available or null.
tryNext() - Method in class com.mongodb.DBCursor
Non blocking check for tailable cursors to see if another object is available.
TYPE - Static variable in class com.mongodb.QueryOperators
 

U

unacknowledged() - Static method in class com.mongodb.WriteResult
Gets an instance representing an unacknowledged write.
UNIQUE_DOCS - Static variable in class com.mongodb.QueryOperators
 
unlock() - Method in class com.mongodb.Mongo
Deprecated.
update(DBObject) - Method in class com.mongodb.BulkUpdateRequestBuilder
Adds a request to update all documents in the collection that match the query with which this builder was created.
update(DBObject) - Method in class com.mongodb.BulkWriteRequestBuilder
Adds a request to update all documents in the collection that match the query with which this builder was created.
update(DBObject) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the update
update(DBObject, DBObject) - Method in class com.mongodb.DBCollection
Modify an existing document.
update(DBObject, DBObject, boolean, boolean) - Method in class com.mongodb.DBCollection
Modify an existing document or documents in collection.
update(DBObject, DBObject, boolean, boolean, WriteConcern) - Method in class com.mongodb.DBCollection
Modify an existing document or documents in collection.
update(DBObject, DBObject, boolean, boolean, WriteConcern, DBEncoder) - Method in class com.mongodb.DBCollection
Modify an existing document or documents in collection.
update(DBObject, DBObject, boolean, boolean, WriteConcern, Boolean, DBEncoder) - Method in class com.mongodb.DBCollection
Modify an existing document or documents in collection.
update(DBObject, DBObject, DBCollectionUpdateOptions) - Method in class com.mongodb.DBCollection
Modify an existing document or documents in collection.
updateMany(ClientSession, Bson, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(ClientSession, Bson, List<? extends Bson>, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(ClientSession, Bson, Bson) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(ClientSession, Bson, Bson, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(Bson, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(Bson, List<? extends Bson>, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(Bson, Bson) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMany(Bson, Bson, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update all documents in the collection according to the specified arguments.
updateMulti(DBObject, DBObject) - Method in class com.mongodb.DBCollection
Modify documents in collection.
updateOne(ClientSession, Bson, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(ClientSession, Bson, List<? extends Bson>, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(ClientSession, Bson, Bson) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(ClientSession, Bson, Bson, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(DBObject) - Method in class com.mongodb.BulkUpdateRequestBuilder
Adds a request to update one document in the collection that matches the query with which this builder was created.
updateOne(DBObject) - Method in class com.mongodb.BulkWriteRequestBuilder
Adds a request to update one document in the collection that matches the query with which this builder was created.
updateOne(Bson, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(Bson, List<? extends Bson>, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(Bson, Bson) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
updateOne(Bson, Bson, UpdateOptions) - Method in interface com.mongodb.client.MongoCollection
Update a single document in the collection according to the specified arguments.
uploadFromStream(ClientSession, String, InputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(ClientSession, String, InputStream, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(ClientSession, BsonValue, String, InputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(ClientSession, BsonValue, String, InputStream, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(String, InputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(String, InputStream, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(BsonValue, String, InputStream) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
uploadFromStream(BsonValue, String, InputStream, GridFSUploadOptions) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Uploads the contents of the given InputStream to a GridFS bucket.
upsert() - Method in class com.mongodb.BulkWriteRequestBuilder
Specifies that the request being built should be an upsert.
upsert(boolean) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the upsert
upsert(boolean) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Set to true if a new document should be inserted if there are no matches to the query filter.
useCursor(Boolean) - Method in interface com.mongodb.client.AggregateIterable
Deprecated.
There is no replacement for this. Applications can assume that the driver will use a cursor for server versions that support it (>= 2.6). The driver will ignore this as of MongoDB 3.6, which does not support inline results for the aggregate command.
Util - Class in com.mongodb.util
Deprecated.
there is no replacement for this class
Util() - Constructor for class com.mongodb.util.Util
Deprecated.
 
uuidRepresentation(UuidRepresentation) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the UUID representation to use when encoding instances of UUID and when decoding BSON binary values with subtype of 3.

V

validate() - Method in class com.mongodb.gridfs.GridFSFile
Deprecated.
there is no replacement for this method
valueOf(String) - Static method in enum com.mongodb.AggregationOptions.OutputMode
Deprecated.
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum com.mongodb.MapReduceCommand.OutputType
Returns the enum constant of this type with the specified name.
values() - Static method in enum com.mongodb.AggregationOptions.OutputMode
Deprecated.
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum com.mongodb.MapReduceCommand.OutputType
Returns an array containing the constants of this enum type, in the order they are declared.
verbose(boolean) - Method in interface com.mongodb.client.MapReduceIterable
Sets whether to include the timing information in the result information.

W

w - Variable in class com.mongodb.MongoOptions
Deprecated.
The "w" value, (number of writes), of the global WriteConcern.
wasAcknowledged() - Method in class com.mongodb.WriteResult
Returns true if the write was acknowledged.
watch() - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch() - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch() - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch() - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(ClientSession) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(ClientSession) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(ClientSession) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(ClientSession) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(ClientSession, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(ClientSession, Class<TResult>) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(ClientSession, List<? extends Bson>) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(ClientSession, List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(ClientSession, List<? extends Bson>) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(ClientSession, List<? extends Bson>) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(ClientSession, List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(ClientSession, List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(ClientSession, List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(ClientSession, List<? extends Bson>, Class<TResult>) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(Class<TResult>) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(Class<TResult>) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(List<? extends Bson>) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(List<? extends Bson>) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(List<? extends Bson>) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(List<? extends Bson>) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
watch(List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoClient
Creates a change stream for this client.
watch(List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoCollection
Creates a change stream for this collection.
watch(List<? extends Bson>, Class<TResult>) - Method in interface com.mongodb.client.MongoDatabase
Creates a change stream for this database.
watch(List<? extends Bson>, Class<TResult>) - Method in class com.mongodb.MongoClient
Creates a change stream for this client.
WHERE - Static variable in class com.mongodb.QueryOperators
 
withChunkSizeBytes(int) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Create a new GridFSBucket instance with a new chunk size in bytes.
withCodecRegistry(CodecRegistry) - Method in interface com.mongodb.client.MongoCollection
Create a new MongoCollection instance with a different codec registry.
withCodecRegistry(CodecRegistry) - Method in interface com.mongodb.client.MongoDatabase
Create a new MongoDatabase instance with a different codec registry.
withDisableMD5(boolean) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Deprecated.
there is no replacement for this method, as MD5 is being removed
withDocumentClass(Class<NewTDocument>) - Method in interface com.mongodb.client.MongoCollection
Create a new MongoCollection instance with a different default class to cast any documents returned from the database into..
withDocumentClass(Class<TDocument>) - Method in interface com.mongodb.client.ChangeStreamIterable
Returns a MongoIterable containing the results of the change stream based on the document class provided.
WITHIN - Static variable in class com.mongodb.QueryOperators
 
withinBox(double, double, double, double) - Method in class com.mongodb.QueryBuilder
Equivalent to a $within operand, based on a bounding box using represented by two corners
withinCenter(double, double, double) - Method in class com.mongodb.QueryBuilder
Equivalent of the $within operand, used for geospatial operation
withinCenterSphere(double, double, double) - Method in class com.mongodb.QueryBuilder
Equivalent of the $centerSphere operand mostly intended for queries up to a few hundred miles or km.
withinPolygon(List<Double[]>) - Method in class com.mongodb.QueryBuilder
Equivalent to a $within operand, based on a bounding polygon represented by an array of points
withReadConcern(ReadConcern) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Create a new GridFSBucket instance with a different read concern.
withReadConcern(ReadConcern) - Method in interface com.mongodb.client.MongoCollection
Create a new MongoCollection instance with a different read concern.
withReadConcern(ReadConcern) - Method in interface com.mongodb.client.MongoDatabase
Create a new MongoDatabase instance with a different read concern.
withReadPreference(ReadPreference) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Create a new GridFSBucket instance with a different read preference.
withReadPreference(ReadPreference) - Method in interface com.mongodb.client.MongoCollection
Create a new MongoCollection instance with a different read preference.
withReadPreference(ReadPreference) - Method in interface com.mongodb.client.MongoDatabase
Create a new MongoDatabase instance with a different read preference.
withTransaction(TransactionBody<T>) - Method in interface com.mongodb.client.ClientSession
Execute the given function within a transaction.
withTransaction(TransactionBody<T>, TransactionOptions) - Method in interface com.mongodb.client.ClientSession
Execute the given function within a transaction.
withWriteConcern(WriteConcern) - Method in interface com.mongodb.client.gridfs.GridFSBucket
Create a new GridFSBucket instance with a different write concern.
withWriteConcern(WriteConcern) - Method in interface com.mongodb.client.MongoCollection
Create a new MongoCollection instance with a different write concern.
withWriteConcern(WriteConcern) - Method in interface com.mongodb.client.MongoDatabase
Create a new MongoDatabase instance with a different write concern.
write(byte[]) - Method in class com.mongodb.client.gridfs.GridFSUploadStream
 
write(byte[], int, int) - Method in class com.mongodb.client.gridfs.GridFSUploadStream
 
write(int) - Method in class com.mongodb.client.gridfs.GridFSUploadStream
 
writeConcern - Variable in class com.mongodb.MongoOptions
Deprecated.
Sets the write concern.
writeConcern(WriteConcern) - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
Sets the writeConcern
writeConcern(WriteConcern) - Method in class com.mongodb.client.model.DBCollectionRemoveOptions
Sets the write concern
writeConcern(WriteConcern) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
Sets the write concern
writeConcern(WriteConcern) - Method in class com.mongodb.InsertOptions
Set the write concern to use for the insert.
writeConcern(WriteConcern) - Method in class com.mongodb.MongoClientOptions.Builder
Sets the write concern.
WriteConcernError - Class in com.mongodb
An error representing a failure by the server to apply the requested write concern to the bulk operation.
WriteConcernError(int, String, DBObject) - Constructor for class com.mongodb.WriteConcernError
Constructs a new instance.
writeObject(OutputBuffer, BSONObject) - Method in interface com.mongodb.DBEncoder
Encode the BSONObject.
writeObject(OutputBuffer, BSONObject) - Method in class com.mongodb.DefaultDBEncoder
 
writeObject(OutputBuffer, BSONObject) - Method in class com.mongodb.LazyDBEncoder
 
WriteResult - Class in com.mongodb
This class lets you access the results of the previous acknowledged write.
WriteResult(int, boolean, Object) - Constructor for class com.mongodb.WriteResult
Construct a new instance.
writeTo(File) - Method in class com.mongodb.gridfs.GridFSDBFile
Writes the file's data to a file on disk.
writeTo(OutputStream) - Method in class com.mongodb.gridfs.GridFSDBFile
Writes the file's data to an OutputStream.
writeTo(String) - Method in class com.mongodb.gridfs.GridFSDBFile
Writes the file's data to a file on disk.
wtimeout - Variable in class com.mongodb.MongoOptions
Deprecated.
The "wtimeout" value of the global WriteConcern.

_

_msDateFormat - Static variable in class com.mongodb.util.JSONCallback
Deprecated.
 
_secDateFormat - Static variable in class com.mongodb.util.JSONCallback
Deprecated.
 
A B C D E F G H I J K L M N O P Q R S T U V W _ 
All Classes All Packages