Package com.mongodb
The core mongodb package
-
Interface Summary Interface Description Block<T> An interface for applying some logic against the given parameter.DBObject This interface adds some specific behaviour toBSONObject
for MongoDB documents.Function<T,R> Apply a function to the input object yielding an appropriate result object. -
Class Summary Class Description AutoEncryptionSettings The client-side automatic encryption settings.AutoEncryptionSettings.Builder A builder forAutoEncryptionSettings
so thatAutoEncryptionSettings
can be immutable, and to support easier construction through chaining.BasicDBList An implementation of List that reflects the way BSON lists work.BasicDBObject A basic implementation of BSON object that is MongoDB specific.BasicDBObjectBuilder Utility for building complex objects.BSONTimestampCodec Knows how to encode and decode BSON timestamps.ClientEncryptionSettings The client-side settings for data key creation and explicit encryption.ClientEncryptionSettings.Builder A builder forClientEncryptionSettings
so thatClientEncryptionSettings
can be immutable, and to support easier construction through chaining.ClientSessionOptions The options to apply to aClientSession
.ClientSessionOptions.Builder A builder for instances ofClientSession
ConnectionString Represents a Connection String.CreateIndexCommitQuorum A commit quorum specifies how many data-bearing members of a replica set, including the primary, must complete the index builds successfully before the primary marks the indexes as ready.DBObjectCodec A collectible codec for a DBObject.DBObjectCodecProvider A provider for a DBObjectCodec.DBRef A representation of a database reference.DBRefCodec A Codec for DBRef instances.DBRefCodecProvider A codec provider for DBRef.DocumentToDBRefTransformer A Document to DBRef Transformer.MongoClientSettings Various settings to control the behavior of aMongoClient
.MongoClientSettings.Builder A builder forMongoClientSettings
so thatMongoClientSettings
can be immutable, and to support easier construction through chaining.MongoCompressor Metadata describing a compressor to use for sending and receiving messages to a MongoDB server.MongoCredential Represents credentials to authenticate to a mongo server,as well as the source of the credentials and the authentication mechanism to use.MongoDriverInformation The MongoDriverInformation class allows driver and library authors to add extra information about their library.MongoDriverInformation.Builder MongoNamespace A MongoDB namespace, which includes a database name and collection name.ReadConcern A read concern allows clients to choose a level of isolation for their reads.ReadPreference A class that represents preferred replica set members to which a query or command can be sent.ReadPreferenceHedgeOptions Options to apply to hedged reads in the server.ReadPreferenceHedgeOptions.Builder The builder for read preference hedge optionsServerAddress Represents the location of a Mongo server - i.e.ServerCursor A class representing a cursor id associated with a server address (host/port) Since cursor ids are only useful in the context of a single MongoDB server process, you need both values to do a getMore on the cursor.Tag A replica set tag.TaggableReadPreference Abstract class for all preference which can be combined with tagsTagSet An immutable set of tags, used to select members of a replica set to use for read operations.TransactionOptions Options to apply to transactions.TransactionOptions.Builder The builder for transaction optionsUnixServerAddress Represents the location of a MongoD unix domain socket.WriteConcern Controls the acknowledgment of write operations with various options.WriteConcernResult The result of a successful write operation.WriteError Represents the details of a write error , e.g. -
Enum Summary Enum Description AuthenticationMechanism An enumeration of the MongodDB-supported authentication mechanisms.CursorType An enumeration of cursor types.ErrorCategory A categorization of errors returned by a MongoDB server command.ExplainVerbosity An enumeration of the verbosity levels available for explaining query execution.ReadConcernLevel A read concern level allows clients to choose a level of isolation for their reads. -
Exception Summary Exception Description DuplicateKeyException Subclass ofWriteConcernException
representing a duplicate key exceptionMongoBulkWriteException An exception that represents all errors associated with a bulk write operation.MongoChangeStreamException An exception indicating that a failure occurred when running a$changeStream
.MongoClientException A base class for exceptions indicating a failure condition with the MongoClient.MongoCommandException An exception indicating that a command sent to a MongoDB server returned a failure.MongoConfigurationException An exception indicating a configuration error in the client.MongoCursorNotFoundException Subclass ofMongoException
representing a cursor-not-found exception.MongoException Top level Exception for all Exceptions, server-side or client-side, that come from the driver.MongoExecutionTimeoutException Exception indicating that the execution of the current operation timed out as a result of the maximum operation time being exceeded.MongoGridFSException An exception indicating that a failure occurred in GridFS.MongoIncompatibleDriverException An exception indicating that this version of the driver is not compatible with at least one of the servers that it is currently connected to.MongoInternalException A Mongo exception internal to the driver, not carrying any error code.MongoInterruptedException A non-checked exception indicating that the driver has been interrupted by a call to Thread.interrupt.MongoNodeIsRecoveringException An exception indicating that the server is a member of a replica set but is in recovery mode, and therefore refused to execute the operation.MongoNotPrimaryException An exception indicating that the server is a member of a replica set but is not the primary, and therefore refused to execute either a write operation or a read operation that required a primary.MongoQueryException An exception indicating that a query operation failed on the server.MongoSecurityException This exception is thrown when there is an error reported by the underlying client authentication mechanism.MongoServerException An exception indicating that some error has been raised by a MongoDB server in response to an operation.MongoSocketClosedException This exception is thrown when trying to read or write from a closed socket.MongoSocketException Subclass ofMongoException
representing a network-related exceptionMongoSocketOpenException This exception is thrown when there is an exception opening a Socket.MongoSocketReadException This exception is thrown when there is an exception reading a response from a Socket.MongoSocketReadTimeoutException This exception is thrown when there is a timeout reading a response from the socket.MongoSocketWriteException This exception is thrown when there is an exception writing a response to a Socket.MongoTimeoutException An exception indicating that the driver has timed out waiting for either a server or a connection to become available.MongoWriteConcernException An exception indicating a failure to apply the write concern to the requested write operationMongoWriteException An exception indicating the failure of a write operation.WriteConcernException An exception representing an error reported due to a write failure.