MongoClientSettings instead@Immutable @Deprecated public final class MongoClientSettings extends Object
MongoClient.| Modifier and Type | Class | Description | 
|---|---|---|
static class  | 
MongoClientSettings.Builder | 
 Deprecated.  
A builder for  
MongoClientSettings so that MongoClientSettings can be immutable, and to support easier construction
 through chaining. | 
| Modifier and Type | Method | Description | 
|---|---|---|
static MongoClientSettings.Builder | 
builder() | 
 Deprecated.  
Convenience method to create a Builder. 
 | 
static MongoClientSettings.Builder | 
builder(MongoClientSettings settings) | 
 Deprecated.  
Convenience method to create a from an existing  
MongoClientSettings. | 
String | 
getApplicationName() | 
 Deprecated.  
Gets the logical name of the application using this MongoClient. 
 | 
ClusterSettings | 
getClusterSettings() | 
 Deprecated.  
Gets the cluster settings. 
 | 
CodecRegistry | 
getCodecRegistry() | 
 Deprecated.  
The codec registry to use. 
 | 
List<CommandListener> | 
getCommandListeners() | 
 Deprecated.  
Gets the list of added  
CommandListener. | 
List<MongoCompressor> | 
getCompressorList() | 
 Deprecated.  
Gets the compressors to use for compressing messages to the server. 
 | 
ConnectionPoolSettings | 
getConnectionPoolSettings() | 
 Deprecated.  
Gets the settings for the connection provider in a settings object. 
 | 
MongoCredential | 
getCredential() | 
 Deprecated.  
Gets the credential. 
 | 
List<MongoCredential> | 
getCredentialList() | 
 Deprecated. 
 
Prefer  
getCredential() | 
SocketSettings | 
getHeartbeatSocketSettings() | 
 Deprecated.  
Gets the connection settings for the heartbeat thread (the background task that checks the state of the cluster) wrapped in a
 settings object. 
 | 
ReadConcern | 
getReadConcern() | 
 Deprecated.  
The read concern to use. 
 | 
ReadPreference | 
getReadPreference() | 
 Deprecated.  
The read preference to use for queries, map-reduce, aggregation, and count. 
 | 
boolean | 
getRetryWrites() | 
 Deprecated.  
Returns true if writes should be retried if they fail due to a network error. 
 | 
ServerSettings | 
getServerSettings() | 
 Deprecated.  
Gets the server-specific settings wrapped in a settings object. 
 | 
SocketSettings | 
getSocketSettings() | 
 Deprecated.  
Gets the connection-specific settings wrapped in a settings object. 
 | 
SslSettings | 
getSslSettings() | 
 Deprecated.  
Gets the SSL settings. 
 | 
StreamFactoryFactory | 
getStreamFactoryFactory() | 
 Deprecated.  
Gets the factory to use to create a  
StreamFactory. | 
WriteConcern | 
getWriteConcern() | 
 Deprecated.  
The write concern to use. 
 | 
public static MongoClientSettings.Builder builder()
public static MongoClientSettings.Builder builder(MongoClientSettings settings)
MongoClientSettings.settings - create a builder from existing settingspublic ReadPreference getReadPreference()
Default is ReadPreference.primary().
ReadPreference.primary()@Deprecated public List<MongoCredential> getCredentialList()
getCredential()@Nullable public MongoCredential getCredential()
public WriteConcern getWriteConcern()
Default is WriteConcern.ACKNOWLEDGED.
WriteConcern.ACKNOWLEDGEDpublic boolean getRetryWrites()
public ReadConcern getReadConcern()
public CodecRegistry getCodecRegistry()
MongoClient will be able to encode and decode instances of 
 Document.MongoClient.getDatabase(java.lang.String)@Nullable public StreamFactoryFactory getStreamFactoryFactory()
StreamFactory.public List<CommandListener> getCommandListeners()
CommandListener. The default is an empty list.@Nullable public String getApplicationName()
Default is null.
public List<MongoCompressor> getCompressorList()
Default is the empty list.
public ClusterSettings getClusterSettings()
public SslSettings getSslSettings()
public SocketSettings getSocketSettings()
MongoClientSettings instance.SocketSettingspublic SocketSettings getHeartbeatSocketSettings()
SocketSettingspublic ConnectionPoolSettings getConnectionPoolSettings()
MongoClientSettings instance that relate to the
 connection provider.ConnectionPoolSettingspublic ServerSettings getServerSettings()
MongoClientSettings instance.ServerSettings