public static class MongoClients.Builder extends Object
| Modifier and Type | Field and Description |
|---|---|
private List<com.mongodb.MongoCredential> |
credentials |
private com.mongodb.MongoClientOptions.Builder |
optionBuilder |
| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
MongoClients |
build()
Build the client pool that will use the credentials and options already configured on this builder.
|
com.mongodb.MongoClientOptions.Builder |
options()
Obtain the options builder for client connections.
|
MongoClients.Builder |
withCredential(com.mongodb.MongoCredential credential)
Add the given
MongoCredential for use when creating clients. |
private final List<com.mongodb.MongoCredential> credentials
private final com.mongodb.MongoClientOptions.Builder optionBuilder
public MongoClients.Builder withCredential(com.mongodb.MongoCredential credential)
MongoCredential for use when creating clients.credential - the credential; may be null, though this method does nothing if nullpublic com.mongodb.MongoClientOptions.Builder options()
public MongoClients build()
Copyright © 2020 JBoss by Red Hat. All rights reserved.