Package com.mongodb
Class ClientEncryptionSettings.Builder
- java.lang.Object
-
- com.mongodb.ClientEncryptionSettings.Builder
-
- Enclosing class:
- ClientEncryptionSettings
@NotThreadSafe public static final class ClientEncryptionSettings.Builder extends Object
A builder forClientEncryptionSettings
so thatClientEncryptionSettings
can be immutable, and to support easier construction through chaining.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientEncryptionSettings
build()
Build an instance ofClientEncryptionSettings
.ClientEncryptionSettings.Builder
keyVaultMongoClientSettings(MongoClientSettings keyVaultMongoClientSettings)
Sets the key vault settings.ClientEncryptionSettings.Builder
keyVaultNamespace(String keyVaultNamespace)
Sets the key vault namespaceClientEncryptionSettings.Builder
kmsProviders(Map<String,Map<String,Object>> kmsProviders)
Sets the KMS providers map.
-
-
-
Method Detail
-
keyVaultMongoClientSettings
public ClientEncryptionSettings.Builder keyVaultMongoClientSettings(MongoClientSettings keyVaultMongoClientSettings)
Sets the key vault settings.- Parameters:
keyVaultMongoClientSettings
- the key vault mongo client settings, which may be null.- Returns:
- this
- See Also:
ClientEncryptionSettings.getKeyVaultMongoClientSettings()
-
keyVaultNamespace
public ClientEncryptionSettings.Builder keyVaultNamespace(String keyVaultNamespace)
Sets the key vault namespace- Parameters:
keyVaultNamespace
- the key vault namespace, which may not be null- Returns:
- this
- See Also:
ClientEncryptionSettings.getKeyVaultNamespace()
-
kmsProviders
public ClientEncryptionSettings.Builder kmsProviders(Map<String,Map<String,Object>> kmsProviders)
Sets the KMS providers map.- Parameters:
kmsProviders
- the KMS providers map, which may not be null- Returns:
- this
- See Also:
ClientEncryptionSettings.getKmsProviders()
-
build
public ClientEncryptionSettings build()
Build an instance ofClientEncryptionSettings
.- Returns:
- the settings from this builder
-
-