Index
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
A
- 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.
- 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.
- 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.
- AggregationOptions - Class in com.mongodb
-
The options to apply to an aggregate operation.
- AggregationOptions.Builder - Class in com.mongodb
-
Builder for creating
AggregationOptions
. - all(Object) - Method in class com.mongodb.QueryBuilder
-
Equivalent of the $all operand
- ALL - Static variable in class com.mongodb.QueryOperators
-
ALL
- allowDiskUse(Boolean) - Method in class com.mongodb.AggregationOptions.Builder
-
Set whether to enable external sort capabilities.
- 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
-
AND
- 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
- asMongoClientSettings(List<ServerAddress>, String, ClusterConnectionMode, MongoCredential) - Method in class com.mongodb.MongoClientOptions
-
Translate this instance into
MongoClientSettings
. - autoEncryptionSettings(AutoEncryptionSettings) - Method in class com.mongodb.MongoClientOptions.Builder
-
Set options for auto-encryption.
- available() - Method in interface com.mongodb.Cursor
-
Gets the number of results available locally without blocking, which may be 0.
- available() - Method in class com.mongodb.DBCursor
-
Gets the number of results available locally without blocking, which may be 0.
B
- batchSize(int) - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
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(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
-
BOX
- 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.
- 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(MongoClientOptions) - Static method in class com.mongodb.MongoClientOptions
-
Creates a builder instance.
- builder(MongoClientSettings) - Static method in class com.mongodb.MongoClientOptions
-
Creates a builder instance from a
MongoClientSettings
instance. - Builder() - Constructor for class com.mongodb.MongoClientOptions.Builder
-
Creates a Builder for MongoClientOptions.
- 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.
- 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 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.
C
- CENTER - Static variable in class com.mongodb.QueryOperators
-
CENTER
- CENTER_SPHERE - Static variable in class com.mongodb.QueryOperators
-
CENTER_SPHERE
- 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.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 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.
- com.mongodb - package com.mongodb
- 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.gridfs - package com.mongodb.gridfs
-
Contains the classes for supporting MongoDB's specification for storing very large files, GridFS.
- 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 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.
- compressorList(List<MongoCompressor>) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the compressors to use for compressing messages to the server.
- connectionsPerHost(int) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the maximum number of connections per host.
- connectTimeout(int) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the connection timeout.
- containsField(String) - Method in class com.mongodb.gridfs.GridFSFile
- 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.
- count() - Method in class com.mongodb.DBCollection
-
Same as
DBCollection.getCount()
- count() - Method in class com.mongodb.DBCursor
-
Counts the number of objects matching the query.
- count(DBObject) - Method in class com.mongodb.DBCollection
-
Get the count of documents in collection that would match a criteria.
- 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.
- 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(boolean, List<String>) - Method in class com.mongodb.DefaultDBCallback
- create(DBCollection) - Method in interface com.mongodb.DBCallbackFactory
-
Creates a DBCallback for the given collection.
- 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(String, DBObject) - Method in class com.mongodb.DB
-
Creates a collection with a given name 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(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.
- createObject(byte[], int) - Method in class com.mongodb.LazyDBCallback
- 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.
- curr() - Method in class com.mongodb.DBCursor
-
Returns the element the cursor is at.
- Cursor - Interface in com.mongodb
-
Interface for providing consistent behaviour between different Cursor implementations.
- cursorFinalizerEnabled(boolean) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets whether cursor finalizers are enabled.
- 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
- DB - Class in com.mongodb
-
A thread-safe client view of a logical database in a MongoDB cluster.
- 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(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(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
- 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
- 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.
- drop() - Method in class com.mongodb.DBCollection
-
Drops (deletes) this collection from the database.
- drop() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.Drops the collection that holds the results.
- dropDatabase() - Method in class com.mongodb.DB
-
Drops this database.
- dropDatabase(String) - Method in class com.mongodb.MongoClient
-
Drops the database if it exists.
- dropIndex(DBObject) - Method in class com.mongodb.DBCollection
-
Drops an index from this collection.
- dropIndex(String) - Method in class com.mongodb.DBCollection
-
Drops the index with the given name from this collection.
- dropIndexes() - Method in class com.mongodb.DBCollection
-
Drop all indexes on this collection.
- 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
-
ELEM_MATCH
- 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
- 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.MongoClientOptions
- equals(Object) - Method in class com.mongodb.MongoClientURI
- equals(Object) - Method in class com.mongodb.WriteConcernError
- 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(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
-
EXISTS
- explain() - Method in class com.mongodb.DBCursor
-
Returns an object containing basic information about the execution of the query that created this cursor.
- 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
-
The
DBCallbackFactory
forDefaultDBCallback
instances. - FACTORY - Static variable in class com.mongodb.DefaultDBDecoder
-
The
DBDecoderFactory
forDefaultDBDecoder
instances. - FACTORY - Static variable in class com.mongodb.DefaultDBEncoder
-
The
DBEncoderFactory
forDefaultDBEncoder
instances. - FACTORY - Static variable in class com.mongodb.LazyDBDecoder
-
The
DBDecoderFactory
forLazyDBDecoder
instances. - 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.
- find() - Method in class com.mongodb.DBCollection
-
Select all documents in collection and get a cursor to the selected documents.
- 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(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(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.
- 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.
G
- get() - Method in class com.mongodb.QueryBuilder
-
Creates a
DBObject
query to be used for the driver's find operations - get(String) - Method in class com.mongodb.gridfs.GridFSFile
- getAliases() - Method in class com.mongodb.gridfs.GridFSFile
-
Gets the aliases from the metadata.
- 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.
- 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 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
-
Deprecated.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.
- getClusterDescription() - Method in class com.mongodb.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 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
-
Deprecated.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(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.
- getCollectionName() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.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
-
Deprecated.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.
- getConnectTimeout() - Method in class com.mongodb.MongoClientOptions
-
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.
- 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.
- 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(String) - Method in class com.mongodb.MongoClient
- getDatabaseName() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.Get the name of the database that the results of the map reduce were saved into.
- 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.MongoClient
-
Deprecated.
- 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.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.DBCollection
-
Get the encoder factory for this collection.
- 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.
- 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.
- getDuration() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.Get the amount of time, in milliseconds, that it took to run this map reduce.
- getEmitCount() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.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.
- 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
-
Deprecated.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
- 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.
- getHintString() - Method in class com.mongodb.client.model.DBCollectionCountOptions
-
Gets the hint string to apply.
- getHintString() - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
Returns the hint string for the name of the index to use.
- getHosts() - Method in class com.mongodb.MongoClientURI
-
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.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
-
Deprecated.Get the name of the collection the MapReduce will read from
- getInputCount() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.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.
- getJsMode() - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Gets the (optional) JavaScript mode
- getKeysWanted() - Method in class com.mongodb.DBCursor
-
Gets the fields to be returned.
- 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
-
Deprecated.Gets the (optional) limit on input
- getLocalThreshold() - Method in class com.mongodb.MongoClientOptions
-
Gets the local threshold.
- getMaintenanceFrequency() - Method in class com.mongodb.MongoClientOptions
-
Returns the time period between runs of the maintenance job on each connection pool.
- getMaintenanceInitialDelay() - Method in class com.mongodb.MongoClientOptions
-
Returns the period of time to wait before running the first maintenance job on each connection pool.
- getMap() - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Get the map function, as a JS String
- 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.
- getMaxConnecting() - Method in class com.mongodb.MongoClientOptions
-
The maximum number of connections a pool may be establishing concurrently.
- 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
-
Deprecated.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.
- getMessage() - Method in class com.mongodb.BulkWriteError
-
Gets the message associated with this error.
- 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.
- 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.
- 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 class com.mongodb.DB
-
Returns the name of this database.
- getName() - Method in class com.mongodb.DBCollection
-
Get the name of a collection.
- getObjectClass() - Method in class com.mongodb.DBCollection
-
Gets the default class for objects in the collection
- 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 inMongoClientURI
. - getOptions() - Method in class com.mongodb.MongoClientURI
-
Gets the options
- getOutputCollection() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.Gets the collection that holds the results (Will return null if results are Inline).
- getOutputCount() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.Get the number of documents generated as a result of this map reduce
- getOutputDB() - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Gets the (optional) database name where the output collection should reside
- 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
-
Deprecated.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
-
Deprecated.Gets the OutputType for this instance.
- getPassword() - Method in class com.mongodb.MongoClientURI
-
Gets the password
- 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
-
Deprecated.Gets the query to run for this MapReduce job
- 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 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.MongoClient
-
Gets the read concern
- getReadConcern() - Method in class com.mongodb.MongoClientOptions
-
The read concern to use.
- 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 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
-
Deprecated.Gets the read preference
- getReadPreference() - Method in class com.mongodb.MongoClient
-
Gets the default read preference
- getReadPreference() - Method in class com.mongodb.MongoClientOptions
-
The read preference to use for queries, map-reduce, aggregation, and count.
- getReduce() - Method in class com.mongodb.MapReduceCommand
-
Deprecated.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.
- getRequiredReplicaSetName() - Method in class com.mongodb.MongoClientOptions
-
Gets the required replica set name.
- 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
-
Deprecated.Gets the (optional) JavaScript scope
- 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
- getServerApi() - Method in class com.mongodb.MongoClientOptions
-
Gets the server API to use when sending commands to the server.
- 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.
- 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.
- getSocketTimeout() - Method in class com.mongodb.MongoClientOptions
-
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
-
Deprecated.Gets the (optional) sort specification object
- getSrvMaxHosts() - Method in class com.mongodb.MongoClientOptions
-
Gets the maximum number of hosts to connect to when using SRV protocol.
- getSrvMaxHosts() - Method in class com.mongodb.MongoClientURI
-
Gets the maximum number of hosts to connect to when using SRV protocol.
- getSrvServiceName() - Method in class com.mongodb.MongoClientOptions
-
Gets the SRV service name.
- getSrvServiceName() - Method in class com.mongodb.MongoClientURI
-
Gets the SRV service name.
- getSslContext() - Method in class com.mongodb.MongoClientOptions
-
Returns the SSLContext.
- 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.
- getUsername() - Method in class com.mongodb.MongoClientURI
-
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. - 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 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.MongoClient
-
Gets the write concern
- getWriteConcern() - Method in class com.mongodb.MongoClientOptions
-
The write concern to use.
- 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.
- 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.
- GridFSDBFile - Class in com.mongodb.gridfs
-
This class enables retrieving a GridFS file metadata and content.
- GridFSDBFile() - Constructor for class com.mongodb.gridfs.GridFSDBFile
- GridFSFile - Class in com.mongodb.gridfs
-
The abstract class representing a GridFS file.
- GridFSFile() - Constructor for class com.mongodb.gridfs.GridFSFile
- 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
. - GT - Static variable in class com.mongodb.QueryOperators
-
GT
- GTE - Static variable in class com.mongodb.QueryOperators
-
GTE
H
- 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.MongoClientOptions
- hashCode() - Method in class com.mongodb.MongoClientURI
- hashCode() - Method in class com.mongodb.WriteConcernError
- 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.
- 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
-
Informs the database of an indexed field of the collection in order to improve performance.
- hintString(String) - Method in class com.mongodb.client.model.DBCollectionCountOptions
-
Sets the hint to apply.
- hintString(String) - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
Sets the hint for the name of the index to use.
I
- ID_FIELD_NAME - Static variable in class com.mongodb.DBCollection
-
The name of the field that uniquely identifies each document in a collection.
- in(Object) - Method in class com.mongodb.QueryBuilder
-
Equivalent of the $in operand
- IN - Static variable in class com.mongodb.QueryOperators
-
IN
- 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 - Enum constant in enum class com.mongodb.MapReduceCommand.OutputType
-
Deprecated.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.
- InsertOptions - Class in com.mongodb
-
Options related to insertion of documents into MongoDB.
- InsertOptions() - Constructor for class com.mongodb.InsertOptions
- 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.
- 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.
- 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.
- 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
- isRemove() - Method in class com.mongodb.client.model.DBCollectionFindAndModifyOptions
-
Returns the remove
- isReturnKey() - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
Returns the returnKey.
- isShowRecordId() - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
Returns the showRecordId.
- 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
-
Deprecated.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 class com.mongodb.DBCursor
-
Creates a copy of this cursor object that can be iterated.
K
- keySet() - Method in class com.mongodb.gridfs.GridFSFile
L
- LANGUAGE - Static variable in class com.mongodb.QueryOperators
-
LANGUAGE
- LazyDBCallback - Class in com.mongodb
-
A
BSONCallback
for the creation ofLazyDBObject
andLazyDBList
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.
- 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 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.
- listDatabaseNames() - Method in class com.mongodb.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 class com.mongodb.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(Class<T>) - Method in class com.mongodb.MongoClient
-
Gets the list of databases
- localThreshold(int) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the local threshold.
- LT - Static variable in class com.mongodb.QueryOperators
-
LT
- LTE - Static variable in class com.mongodb.QueryOperators
-
LTE
M
- maintenanceFrequency(long) - Method in class com.mongodb.MongoClientOptions.Builder
-
The time period between runs of the maintenance job on each connection pool.
- maintenanceInitialDelay(long) - Method in class com.mongodb.MongoClientOptions.Builder
-
The period of time to wait before running the first maintenance job on each connection pool.
- mapReduce(MapReduceCommand) - Method in class com.mongodb.DBCollection
-
Allows you to run map-reduce aggregation operations over a collection.
- 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
-
Deprecated.Superseded by aggregate
- MapReduceCommand(DBCollection, String, String, String, MapReduceCommand.OutputType, DBObject) - Constructor for class com.mongodb.MapReduceCommand
-
Deprecated.Represents the command for a map reduce operation Runs the command in REPLACE output type to a named collection
- MapReduceCommand.OutputType - Enum Class in com.mongodb
-
Deprecated.Represents the different options available for outputting the results of a map-reduce operation.
- MapReduceOutput - Class in com.mongodb
-
Deprecated.Superseded by aggregate
- markAsPartialObject() - Method in class com.mongodb.gridfs.GridFSFile
- markAsPartialObject() - Method in class com.mongodb.LazyDBList
- markAsPartialObject() - Method in class com.mongodb.LazyDBObject
- 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_DISTANCE - Static variable in class com.mongodb.QueryOperators
-
MAX_DISTANCE
- maxAwaitTime(long, TimeUnit) - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
Sets the maximum await execution time on the server for this operation.
- maxConnecting(int) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the maximum number of connections a pool may be establishing concurrently.
- 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.
- maxTime(long, TimeUnit) - Method in class com.mongodb.AggregationOptions.Builder
-
Sets the maximum execution time for the aggregation command.
- 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(int) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the maximum time that a thread will block waiting for a connection.
- MERGE - Enum constant in enum class com.mongodb.MapReduceCommand.OutputType
-
Deprecated.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.
- 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
-
MOD
- MongoClient - Class in com.mongodb
-
A MongoDB client with internal connection pooling.
- MongoClient() - Constructor for class com.mongodb.MongoClient
-
Creates an instance based on a (single) MongoDB server (
"mongodb://127.0.0.1:27017"
). - MongoClient(ConnectionString) - Constructor for class com.mongodb.MongoClient
-
Create a new client with the given connection string.
- MongoClient(ConnectionString, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
-
Create a new client with the given connection string.
- MongoClient(MongoClientSettings) - Constructor for class com.mongodb.MongoClient
-
Create a new client with the given client settings.
- MongoClient(MongoClientSettings, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
-
Creates a new client with the given client settings.
- MongoClient(MongoClientURI) - Constructor for class com.mongodb.MongoClient
-
Creates an instance described by a URI.
- MongoClient(MongoClientURI, MongoDriverInformation) - Constructor for class com.mongodb.MongoClient
-
Creates an instance described by a URI.
- MongoClient(ServerAddress) - Constructor for class com.mongodb.MongoClient
-
Creates an instance based on a (single) mongodb node
- MongoClient(ServerAddress, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
-
Creates an 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 an 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(String) - Constructor for class com.mongodb.MongoClient
-
Creates a MongoClient instance based on a connection string.
- MongoClient(String, int) - Constructor for class com.mongodb.MongoClient
-
Creates an instance based on a (single) mongodb node.
- MongoClient(String, MongoClientOptions) - Constructor for class com.mongodb.MongoClient
-
Creates an 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
- MongoClientFactory - Class in com.mongodb.client.jndi
-
An ObjectFactory for MongoClient instances.
- MongoClientFactory() - Constructor for class com.mongodb.client.jndi.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.
- 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 MongoClientURI from the given string.
- MongoClientURI(String, MongoClientOptions.Builder) - Constructor for class com.mongodb.MongoClientURI
-
Creates a MongoClientURI from the given URI string, and MongoClientOptions.Builder.
- multi(boolean) - Method in class com.mongodb.client.model.DBCollectionUpdateOptions
-
Sets whether all documents matching the query filter will be removed.
N
- NE - Static variable in class com.mongodb.QueryOperators
-
NE
- 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
- NEAR_SPHERE - Static variable in class com.mongodb.QueryOperators
-
NEAR_SPHERE
- 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 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
-
NIN
- 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.
- NOR - Static variable in class com.mongodb.QueryOperators
-
NOR
- not() - Method in class com.mongodb.QueryBuilder
-
Equivalent to $not meta operator.
- NOT - Static variable in class com.mongodb.QueryOperators
-
NOT
- notEquals(Object) - Method in class com.mongodb.QueryBuilder
-
Equivalent of the $ne operand
- 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.
- 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
- 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.
- or(DBObject...) - Method in class com.mongodb.QueryBuilder
-
Equivalent to an $or operand
- OR - Static variable in class com.mongodb.QueryOperators
-
OR
P
- 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
-
POLYGON
- 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.
- 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
- putAll(Map) - Method in class com.mongodb.gridfs.GridFSFile
- putAll(BSONObject) - Method in class com.mongodb.gridfs.GridFSFile
- 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.
R
- 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(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.
- REDUCE - Enum constant in enum class com.mongodb.MapReduceCommand.OutputType
-
Deprecated.Reduce the job output with the existing contents of outputTarget collection
- 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
- 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.
- 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.
- REPLACE - Enum constant in enum class com.mongodb.MapReduceCommand.OutputType
-
Deprecated.Save the job output to a collection, replacing its previous content
- 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.
- requiredReplicaSetName(String) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the required replica set name for the cluster.
- results() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.Returns an iterable containing the results of the operation.
- 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.
- returnKey() - Method in class com.mongodb.DBCursor
-
Forces the cursor to only return fields included in the index.
- 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
S
- 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. - SEARCH - Static variable in class com.mongodb.QueryOperators
-
SEARCH
- serverApi(ServerApi) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the server API to use when sending commands to the server.
- 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.
- setBypassDocumentValidation(Boolean) - Method in class com.mongodb.BulkWriteOperation
-
Sets whether to bypass document validation.
- setBypassDocumentValidation(Boolean) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.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
-
Deprecated.Sets the collation options
- setContentType(String) - Method in class com.mongodb.gridfs.GridFSInputFile
-
Sets the content type (MIME type) on the GridFS entry.
- setDBDecoderFactory(DBDecoderFactory) - Method in class com.mongodb.DBCollection
-
Set a custom decoder factory for this collection.
- 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. - 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
-
Deprecated.Sets the Finalize JS Function
- setGridFS(GridFS) - Method in class com.mongodb.gridfs.GridFSFile
-
Sets the GridFS associated with this file.
- 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
- setJsMode(Boolean) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the (optional) JavaScript Mode
- setLimit(int) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the (optional) limit on input
- setMaxTime(long, TimeUnit) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the max execution time for this command, in the given time unit.
- 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.
- setOutputDB(String) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the (optional) database name where the output collection should reside
- 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
-
Deprecated.Sets the read preference for this command.
- setScope(Map<String, Object>) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the (optional) JavaScript scope
- setSort(DBObject) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the (optional) sort specification object
- setVerbose(Boolean) - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Sets the verbosity of the MapReduce job, defaults to 'true'
- 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. - showRecordId(boolean) - Method in class com.mongodb.client.model.DBCollectionFindOptions
-
Sets the showRecordId.
- 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
-
SIZE
- 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.model.DBCollectionCountOptions
-
Sets the number of documents to skip.
- 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.
- srvMaxHosts(Integer) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the maximum number of hosts to connect to when using SRV protocol.
- srvServiceName(String) - Method in class com.mongodb.MongoClientOptions.Builder
-
Sets the SRV service name.
- 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
- startSession() - Method in class com.mongodb.MongoClient
-
Creates a client session with default session options.
- startSession(ClientSessionOptions) - Method in class com.mongodb.MongoClient
-
Creates a client session.
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
-
TEXT
- 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.
- toDBObject() - Method in class com.mongodb.MapReduceCommand
-
Deprecated.Turns this command into a DBObject representation of this map reduce command.
- toMap() - Method in class com.mongodb.gridfs.GridFSFile
- 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.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.LazyDBObject
-
Returns a JSON serialization of this object
- toString() - Method in class com.mongodb.MapReduceCommand
-
Deprecated.
- toString() - Method in class com.mongodb.MapReduceOutput
-
Deprecated.
- toString() - Method in class com.mongodb.MongoClient
- toString() - Method in class com.mongodb.MongoClientOptions
- toString() - Method in class com.mongodb.MongoClientURI
- toString() - Method in class com.mongodb.WriteConcernError
- toString() - Method in class com.mongodb.WriteResult
- 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
-
TYPE
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
-
UNIQUE_DOCS
- 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.
- updateMulti(DBObject, DBObject) - Method in class com.mongodb.DBCollection
-
Modify documents in collection.
- 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.
- 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.
- 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
- valueOf(String) - Static method in enum class com.mongodb.MapReduceCommand.OutputType
-
Deprecated.Returns the enum constant of this class with the specified name.
- values() - Static method in enum class com.mongodb.MapReduceCommand.OutputType
-
Deprecated.Returns an array containing the constants of this enum class, in the order they are declared.
W
- wasAcknowledged() - Method in class com.mongodb.WriteResult
-
Returns true if the write was acknowledged.
- watch() - Method in class com.mongodb.MongoClient
-
Creates a change stream for this client.
- watch(ClientSession) - Method in class com.mongodb.MongoClient
-
Creates a change stream for this client.
- watch(ClientSession, Class<TResult>) - Method in class com.mongodb.MongoClient
-
Creates a change stream for this client.
- 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 class com.mongodb.MongoClient
-
Creates a change stream for this client.
- watch(Class<TResult>) - Method in class com.mongodb.MongoClient
-
Creates a change stream for this client.
- 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 class com.mongodb.MongoClient
-
Creates a change stream for this client.
- WHERE - Static variable in class com.mongodb.QueryOperators
-
WHERE
- WITHIN - Static variable in class com.mongodb.QueryOperators
-
WITHIN
- 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
- 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.
All Classes and Interfaces|All Packages|Constant Field Values|Serialized Form
MongoClient.getDatabase(String)
for new code. Note thatDB
andMongoDatabase
can be used together in the same application, with the same instance.