Package io.debezium.connector.mongodb
Class MongoClients.Builder
- java.lang.Object
-
- io.debezium.connector.mongodb.MongoClients.Builder
-
- Enclosing class:
- MongoClients
public static class MongoClients.Builder extends Object
Configures and builds a ConnectionPool.
-
-
Field Summary
Fields Modifier and Type Field Description private com.mongodb.MongoClientSettings.BuildersettingsBuilder
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MongoClientsbuild()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.MongoClients.BuilderwithCredential(com.mongodb.MongoCredential credential)Add the givenMongoCredentialfor use when creating clients.
-
-
-
Method Detail
-
withCredential
public MongoClients.Builder withCredential(com.mongodb.MongoCredential credential)
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
public MongoClients build()
Build the client pool that will use the credentials and options already configured on this builder.- Returns:
- the new client pool; never null
-
-