Package io.debezium.connector.mongodb
Class MongoClients.Builder
java.lang.Object
io.debezium.connector.mongodb.MongoClients.Builder
- Enclosing class:
- MongoClients
Configures and builds a ConnectionPool.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final com.mongodb.MongoClientSettings.Builder -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the client pool that will use the credentials and options already configured on this builder.com.mongodb.MongoClientSettings.Buildersettings()Obtain the options builder for client connections.withCredential(com.mongodb.MongoCredential credential) Add the givenMongoCredentialfor use when creating clients.
-
Field Details
-
settingsBuilder
private final com.mongodb.MongoClientSettings.Builder settingsBuilder
-
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
withCredential
Add the givenMongoCredentialfor use when creating clients.- Parameters:
credential- the credential; may benull, though this method does nothing ifnull- Returns:
- this builder object so methods can be chained; never null
-
settings
public com.mongodb.MongoClientSettings.Builder settings()Obtain the options builder for client connections.- Returns:
- the option builder; never null
-
build
Build the client pool that will use the credentials and options already configured on this builder.- Returns:
- the new client pool; never null
-