Package com.mongodb.embedded.client
Class MongoClientSettings
- java.lang.Object
-
- com.mongodb.embedded.client.MongoClientSettings
-
@Deprecated @Immutable public final class MongoClientSettings extends Object
Deprecated.the embedded driver will be removed in the next major releaseVarious settings to control the behavior of an EmbeddedMongoClient
.- Since:
- 3.8
- Since server release
- 4.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MongoClientSettings.Builder
Deprecated.A builder forMongoClientSettings
so thatMongoClientSettings
can be immutable, and to support easier construction through chaining.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 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 existingMongoClientSettings
.String
getApplicationName()
Deprecated.Gets the logical name of the application using this MongoClient.CodecRegistry
getCodecRegistry()
Deprecated.The codec registry to use, or null if not set.List<CommandListener>
getCommandListeners()
Deprecated.Gets the list of addedCommandListener
.String
getDbPath()
Deprecated.Gets the dbPath for the embedded mongod.static CodecRegistry
getDefaultCodecRegistry()
Deprecated.Gets the default codec registry.MongoClientSettings
getWrappedMongoClientSettings()
Deprecated.Returns the wrapped MongoClientSettings instance
-
-
-
Method Detail
-
getDefaultCodecRegistry
public static CodecRegistry getDefaultCodecRegistry()
Deprecated.Gets the default codec registry. It includes the following providers:- Returns:
- the default codec registry
-
builder
public static MongoClientSettings.Builder builder()
Deprecated.Convenience method to create a Builder.- Returns:
- a builder
-
builder
public static MongoClientSettings.Builder builder(MongoClientSettings settings)
Deprecated.Convenience method to create a from an existingMongoClientSettings
.- Parameters:
settings
- create a builder from existing settings- Returns:
- a builder
-
getApplicationName
public String getApplicationName()
Deprecated.Gets the logical name of the application using this MongoClient. The application name may be used by the client to identify the application to the server, for use in server logs, slow query logs, and profile collection.Default is null.
- Returns:
- the application name, which may be null
-
getCodecRegistry
public CodecRegistry getCodecRegistry()
Deprecated.The codec registry to use, or null if not set.- Returns:
- the codec registry
-
getCommandListeners
public List<CommandListener> getCommandListeners()
Deprecated.Gets the list of addedCommandListener
.The default is an empty list.
- Returns:
- the unmodifiable list of command listeners
-
getDbPath
public String getDbPath()
Deprecated.Gets the dbPath for the embedded mongod.- Returns:
- the dbPath
-
getWrappedMongoClientSettings
public MongoClientSettings getWrappedMongoClientSettings()
Deprecated.Returns the wrapped MongoClientSettings instance- Returns:
- the wrapped MongoClient Settings instance.
-
-