Package com.mongodb
Class AutoEncryptionSettings.Builder
java.lang.Object
com.mongodb.AutoEncryptionSettings.Builder
- Enclosing class:
- AutoEncryptionSettings
A builder for
AutoEncryptionSettings
so that AutoEncryptionSettings
can be immutable, and to support easier
construction through chaining.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build an instance ofAutoEncryptionSettings
.bypassAutoEncryption
(boolean bypassAutoEncryption) Sets whether auto-encryption should be bypassed.extraOptions
(Map<String, Object> extraOptions) Sets the extra options.keyVaultMongoClientSettings
(MongoClientSettings keyVaultMongoClientSettings) Sets the key vault settings.keyVaultNamespace
(String keyVaultNamespace) Sets the key vault namespaceSets the KMS providers map.kmsProviderSslContextMap
(Map<String, SSLContext> kmsProviderSslContextMap) Sets the KMS provider to SSLContext mapschemaMap
(Map<String, BsonDocument> schemaMap) Sets the map from namespace to local schema document
-
Method Details
-
keyVaultMongoClientSettings
public AutoEncryptionSettings.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:
-
keyVaultNamespace
Sets the key vault namespace- Parameters:
keyVaultNamespace
- the key vault namespace, which may not be null- Returns:
- this
- See Also:
-
kmsProviders
Sets the KMS providers map.- Parameters:
kmsProviders
- the KMS providers map, which may not be null- Returns:
- this
- See Also:
-
kmsProviderSslContextMap
public AutoEncryptionSettings.Builder kmsProviderSslContextMap(Map<String, SSLContext> kmsProviderSslContextMap) Sets the KMS provider to SSLContext map- Parameters:
kmsProviderSslContextMap
- the KMS provider to SSLContext map, which may not be null- Returns:
- this
- Since:
- 4.4
- See Also:
-
schemaMap
Sets the map from namespace to local schema document- Parameters:
schemaMap
- the map from namespace to local schema document- Returns:
- this
- See Also:
-
extraOptions
Sets the extra options.- Parameters:
extraOptions
- the extra options, which may not be null- Returns:
- this
- See Also:
-
bypassAutoEncryption
Sets whether auto-encryption should be bypassed.- Parameters:
bypassAutoEncryption
- whether auto-encryption should be bypassed- Returns:
- this
- See Also:
-
build
Build an instance ofAutoEncryptionSettings
.- Returns:
- the settings from this builder
-