Package com.mongodb.crypt.capi
Class MongoExplicitEncryptOptions.Builder
- java.lang.Object
-
- com.mongodb.crypt.capi.MongoExplicitEncryptOptions.Builder
-
- Enclosing class:
- MongoExplicitEncryptOptions
public static class MongoExplicitEncryptOptions.Builder extends java.lang.ObjectThe builder for the options
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MongoExplicitEncryptOptions.Builderalgorithm(java.lang.String algorithm)Add the encryption algorithm.MongoExplicitEncryptOptionsbuild()Build the options.MongoExplicitEncryptOptions.BuildercontentionFactor(java.lang.Long contentionFactor)The contention factor.MongoExplicitEncryptOptions.BuilderkeyAltName(java.lang.String keyAltName)Add the key alternative name.MongoExplicitEncryptOptions.BuilderkeyId(org.bson.BsonBinary keyId)Add the key identifier.MongoExplicitEncryptOptions.BuilderqueryType(java.lang.String queryType)The QueryType.
-
-
-
Method Detail
-
keyId
public MongoExplicitEncryptOptions.Builder keyId(org.bson.BsonBinary keyId)
Add the key identifier.- Parameters:
keyId- the key idenfifier- Returns:
- this
-
keyAltName
public MongoExplicitEncryptOptions.Builder keyAltName(java.lang.String keyAltName)
Add the key alternative name.- Parameters:
keyAltName- the key alternative name- Returns:
- this
-
algorithm
public MongoExplicitEncryptOptions.Builder algorithm(java.lang.String algorithm)
Add the encryption algorithm.To insert or query with an "Indexed" encrypted payload, use a MongoClient configured with
AutoEncryptionSettings.AutoEncryptionSettings.bypassQueryAnalysismay be true.AutoEncryptionSettings.bypassAutoEncryption must be false.- Parameters:
algorithm- the encryption algorithm- Returns:
- this
-
contentionFactor
public MongoExplicitEncryptOptions.Builder contentionFactor(java.lang.Long contentionFactor)
The contention factor.It is an error to set contentionFactor when algorithm is not "Indexed".
- Parameters:
contentionFactor- the contention factor- Returns:
- this
- Since:
- 1.5
-
queryType
public MongoExplicitEncryptOptions.Builder queryType(java.lang.String queryType)
The QueryType.It is an error to set queryType when algorithm is not "Indexed".
- Parameters:
queryType- the query type- Returns:
- this
- Since:
- 1.5
-
build
public MongoExplicitEncryptOptions build()
Build the options.- Returns:
- the options
-
-