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.connection |
Contains classes that manage connecting to MongoDB servers.
|
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 | Method and Description |
---|---|
abstract List<ServerDescription> |
ReadPreference.choose(ClusterDescription clusterDescription)
Chooses the servers from the given cluster than match this read preference.
|
Modifier and Type | Method and Description |
---|---|
ServerDescription |
AsyncConnectionSource.getServerDescription()
Gets the current description of this source.
|
ServerDescription |
ConnectionSource.getServerDescription()
Gets the current description of this source.
|
Constructor and Description |
---|
AsyncSingleConnectionReadBinding(ReadPreference readPreference,
ServerDescription serverDescription,
AsyncConnection connection)
Construct an instance.
|
SingleConnectionReadBinding(ReadPreference readPreference,
ServerDescription serverDescription,
Connection connection)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
ServerDescription |
ServerDescription.Builder.build()
Create a new ServerDescription from the settings in this builder.
|
ServerDescription |
ClusterDescription.getByServerAddress(ServerAddress serverAddress)
Returns the ServerDescription for the server at the given address
|
ServerDescription |
Server.getDescription()
Gets the description of this server.
|
Modifier and Type | Method and Description |
---|---|
Set<ServerDescription> |
ClusterDescription.getAll()
Returns the Set of all server descriptions in this cluster, sorted by the String value of the ServerAddress of each one.
|
List<ServerDescription> |
ClusterDescription.getAny()
Gets a list of ServerDescriptions for all the servers in this cluster which are currently accessible.
|
List<ServerDescription> |
ClusterDescription.getAnyPrimaryOrSecondary()
Gets a list of all the primaries and secondaries in this cluster.
|
List<ServerDescription> |
ClusterDescription.getAnyPrimaryOrSecondary(TagSet tagSet)
Gets a list of all the primaries and secondaries in this cluster that match the given replica set tags.
|
List<ServerDescription> |
ClusterDescription.getPrimaries()
While it may seem counter-intuitive that a MongoDB cluster can have more than one primary, it can in the case where the client's view
of the cluster is a set of mongos servers, any of which can serve as the primary.
|
List<ServerDescription> |
ClusterDescription.getSecondaries()
Get a list of all the secondaries in this cluster
|
List<ServerDescription> |
ClusterDescription.getSecondaries(TagSet tagSet)
Get a list of all the secondaries in this cluster that match a given TagSet
|
Constructor and Description |
---|
ClusterDescription(ClusterConnectionMode connectionMode,
ClusterType type,
List<ServerDescription> serverDescriptions)
Creates a new ClusterDescription.
|
Modifier and Type | Method and Description |
---|---|
List<ServerDescription> |
ServerSelector.select(ClusterDescription clusterDescription)
Select a list of server descriptions from the given cluster description according to some criteria.
|
List<ServerDescription> |
PrimaryServerSelector.select(ClusterDescription clusterDescription)
Deprecated.
|
List<ServerDescription> |
CompositeServerSelector.select(ClusterDescription clusterDescription) |
List<ServerDescription> |
ReadPreferenceServerSelector.select(ClusterDescription clusterDescription) |
List<ServerDescription> |
ServerAddressSelector.select(ClusterDescription clusterDescription) |
List<ServerDescription> |
WritableServerSelector.select(ClusterDescription clusterDescription) |
List<ServerDescription> |
LatencyMinimizingServerSelector.select(ClusterDescription clusterDescription) |
Copyright © 2016. All Rights Reserved.