Package | Description |
---|---|
com.mongodb |
This package is the main entry point to the MongoDB Java Driver, and it contains the classes for the existing API from 2.x versions.
|
com.mongodb.binding |
This package contains classes that manage binding to MongoDB servers for various operations.
|
com.mongodb.client |
This package contains client interfaces
|
com.mongodb.connection |
Contains classes that manage connecting to MongoDB servers.
|
com.mongodb.connection.netty |
This package contains netty specific classes
|
com.mongodb.operation |
The core of the MongoDB driver works via operations, using the command pattern.
|
com.mongodb.selector |
Contains classes that determine how to select the server to connect to in order to send commands or queries.
|
Modifier and Type | Class and Description |
---|---|
class |
DBAddress
Deprecated.
This class is no longer needed, as the driver does not rely on it for anything anymore. Use
ServerAddress instead. |
Modifier and Type | Method and Description |
---|---|
ServerAddress |
Mongo.getAddress()
Gets the address of the current master
|
ServerAddress |
ServerCursor.getAddress()
Gets the server address.
|
ServerAddress |
ReplicaSetStatus.getMaster()
Gets the ServerAddress of the master server in this replica set.
|
ServerAddress |
DBCursor.getServerAddress() |
ServerAddress |
Cursor.getServerAddress()
Gets the address of the server that data is pulled from.
|
ServerAddress |
MongoServerException.getServerAddress()
Gets the address of the server.
|
ServerAddress |
MongoSocketException.getServerAddress()
Gets the server address for this exception.
|
ServerAddress |
MongoBulkWriteException.getServerAddress()
The address of the server which performed the bulk write operation.
|
ServerAddress |
MongoCursorNotFoundException.getServerAddress()
The server address where the cursor is.
|
Modifier and Type | Method and Description |
---|---|
List<ServerAddress> |
Mongo.getAllAddress()
Gets a list of all server addresses used when this Mongo was created
|
List<ServerAddress> |
Mongo.getServerAddressList()
Gets the list of server addresses currently seen by this client.
|
Modifier and Type | Method and Description |
---|---|
boolean |
ReplicaSetStatus.isMaster(ServerAddress serverAddress)
Checks to see if a given server is the primary server in this replica set.
|
Constructor and Description |
---|
DuplicateKeyException(BsonDocument response,
ServerAddress address,
WriteConcernResult writeConcernResult)
Construct an instance.
|
Mongo(ServerAddress address)
Deprecated.
Replaced by
MongoClient.MongoClient(ServerAddress) |
Mongo(ServerAddress address,
MongoOptions options)
Deprecated.
|
Mongo(ServerAddress left,
ServerAddress right)
Deprecated.
Please use
MongoClient.MongoClient(java.util.List) instead. |
Mongo(ServerAddress left,
ServerAddress right,
MongoOptions options)
Deprecated.
Please use
MongoClient.MongoClient(java.util.List, MongoClientOptions) instead. |
MongoBulkWriteException(BulkWriteResult writeResult,
List<BulkWriteError> writeErrors,
WriteConcernError writeConcernError,
ServerAddress serverAddress)
Constructs a new instance.
|
MongoClient(ServerAddress addr)
Creates a Mongo instance based on a (single) mongodb node
|
MongoClient(ServerAddress addr,
List<MongoCredential> credentialsList)
Creates a Mongo instance based on a (single) mongodb node and a list of credentials
|
MongoClient(ServerAddress addr,
List<MongoCredential> credentialsList,
MongoClientOptions options)
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress and default options.
|
MongoClient(ServerAddress addr,
MongoClientOptions options)
Creates a Mongo instance based on a (single) mongo node using a given ServerAddress and default options.
|
MongoCommandException(BsonDocument response,
ServerAddress address)
Construct a new instance with the CommandResult from a failed command
|
MongoCursorNotFoundException(long cursorId,
ServerAddress serverAddress)
Construct a new instance.
|
MongoNodeIsRecoveringException(ServerAddress serverAddress)
Construct an instance.
|
MongoNotPrimaryException(ServerAddress serverAddress)
Construct an instance.
|
MongoQueryException(ServerAddress address,
int errorCode,
String errorMessage)
Construct an instance.
|
MongoServerException(int code,
String message,
ServerAddress serverAddress)
Construct a new instance.
|
MongoServerException(String message,
ServerAddress serverAddress)
Construct a new instance.
|
MongoSocketClosedException(String message,
ServerAddress address)
Construct an instance.
|
MongoSocketException(String message,
ServerAddress serverAddress)
Construct a new instance.
|
MongoSocketOpenException(String message,
ServerAddress address,
Throwable cause)
Construct an instance.
|
MongoSocketReadException(String message,
ServerAddress address)
Construct a new instance.
|
MongoSocketReadException(String message,
ServerAddress address,
Throwable cause)
Construct a new instance.
|
MongoSocketReadTimeoutException(String message,
ServerAddress address,
Throwable cause)
Construct a new instance
|
MongoSocketWriteException(String message,
ServerAddress address,
Throwable cause)
Construct a new instance.
|
MongoWriteConcernException(WriteConcernError writeConcernError,
ServerAddress serverAddress)
Construct an instance.
|
MongoWriteConcernException(WriteConcernError writeConcernError,
WriteConcernResult writeConcernResult,
ServerAddress serverAddress)
Construct an instance.
|
MongoWriteException(WriteError error,
ServerAddress serverAddress)
Construct an instance
|
ServerCursor(long id,
ServerAddress address)
Construct an instance.
|
WriteConcernException(BsonDocument response,
ServerAddress address,
WriteConcernResult writeConcernResult)
Construct a new instance.
|
Constructor and Description |
---|
Mongo(List<ServerAddress> seeds)
Deprecated.
Replaced by
MongoClient.MongoClient(java.util.List) |
Mongo(List<ServerAddress> seeds,
MongoOptions options)
Deprecated.
|
MongoClient(List<ServerAddress> seeds)
Creates a Mongo based on a list of replica set members or a list of mongos.
|
MongoClient(List<ServerAddress> seeds,
List<MongoCredential> credentialsList)
Creates a Mongo based on a list of replica set members or a list of mongos.
|
MongoClient(List<ServerAddress> seeds,
List<MongoCredential> credentialsList,
MongoClientOptions options)
Creates a Mongo based on a list of replica set members or a list of mongos.
|
MongoClient(List<ServerAddress> seeds,
MongoClientOptions options)
Creates a Mongo based on a list of replica set members or a list of mongos.
|
Constructor and Description |
---|
SingleServerBinding(Cluster cluster,
ServerAddress serverAddress)
Creates an instance, defaulting to
ReadPreference.primary() for reads. |
SingleServerBinding(Cluster cluster,
ServerAddress serverAddress,
ReadPreference readPreference)
Creates an instance.
|
Modifier and Type | Method and Description |
---|---|
ServerAddress |
MongoCursor.getServerAddress()
Returns the server address
|
Modifier and Type | Method and Description |
---|---|
ServerAddress |
ServerDescription.getAddress()
Gets the address of this server
|
ServerAddress |
QueryResult.getAddress()
Gets the server address.
|
ServerAddress |
ServerId.getAddress()
Gets the server address.
|
ServerAddress |
Stream.getAddress()
The address that this stream is connected to.
|
ServerAddress |
ConnectionDescription.getServerAddress()
Gets the server address.
|
Modifier and Type | Method and Description |
---|---|
List<ServerAddress> |
ClusterSettings.getHosts()
Gets the seed list of hosts for the cluster.
|
Modifier and Type | Method and Description |
---|---|
ServerDescription.Builder |
ServerDescription.Builder.address(ServerAddress address)
Sets the address of the server.
|
Stream |
StreamFactory.create(ServerAddress serverAddress)
Create a Stream to the given address
|
Stream |
AsynchronousSocketChannelStreamFactory.create(ServerAddress serverAddress) |
Stream |
SocketStreamFactory.create(ServerAddress serverAddress) |
ServerDescription |
ClusterDescription.getByServerAddress(ServerAddress serverAddress)
Returns the ServerDescription for the server at the given address
|
Modifier and Type | Method and Description |
---|---|
ClusterSettings.Builder |
ClusterSettings.Builder.hosts(List<ServerAddress> hosts)
Sets the hosts for the cluster.
|
Constructor and Description |
---|
BulkWriteBatchCombiner(ServerAddress serverAddress,
boolean ordered,
WriteConcern writeConcern)
Construct an instance.
|
QueryResult(MongoNamespace namespace,
List<T> results,
long cursorId,
ServerAddress serverAddress)
Construct an instance.
|
ServerId(ClusterId clusterId,
ServerAddress address)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
Stream |
NettyStreamFactory.create(ServerAddress serverAddress) |
Modifier and Type | Method and Description |
---|---|
ServerAddress |
BatchCursor.getServerAddress()
Returns the server address
|
Modifier and Type | Method and Description |
---|---|
ServerAddress |
ServerAddressSelector.getServerAddress()
Gets the server address.
|
Constructor and Description |
---|
ServerAddressSelector(ServerAddress serverAddress)
Constructs a new instance.
|
Copyright © 2016. All Rights Reserved.