Class MongoCryptOptions.Builder

  • Enclosing class:
    MongoCryptOptions

    public static class MongoCryptOptions.Builder
    extends java.lang.Object
    The builder for the options
    • Method Detail

      • kmsProviderOptions

        public MongoCryptOptions.Builder kmsProviderOptions​(org.bson.BsonDocument kmsProviderOptions)
        Sets the KMS provider options.
        Parameters:
        kmsProviderOptions - the KMS provider options document
        Returns:
        this
        Since:
        1.1
      • localSchemaMap

        public MongoCryptOptions.Builder localSchemaMap​(java.util.Map<java.lang.String,​org.bson.BsonDocument> localSchemaMap)
        Sets the local schema map.
        Parameters:
        localSchemaMap - local schema map
        Returns:
        this
      • needsKmsCredentialsStateEnabled

        public MongoCryptOptions.Builder needsKmsCredentialsStateEnabled​(boolean needsKmsCredentialsStateEnabled)
        Sets whether the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS is enabled. Defaults to false
        Parameters:
        needsKmsCredentialsStateEnabled - whether the MONGOCRYPT_CTX_NEED_KMS_CREDENTIALS is enabled
        Returns:
        this
        Since:
        1.4
      • encryptedFieldsMap

        public MongoCryptOptions.Builder encryptedFieldsMap​(java.util.Map<java.lang.String,​org.bson.BsonDocument> encryptedFieldsMap)
        Sets the encrypted fields map.
        Parameters:
        encryptedFieldsMap - the encrypted fields map
        Returns:
        this
        Since:
        1.5
      • bypassQueryAnalysis

        public MongoCryptOptions.Builder bypassQueryAnalysis​(boolean bypassQueryAnalysis)
        Sets whether automatic analysis of outgoing commands should be disabled.

        Set bypassQueryAnalysis to true to use explicit encryption on indexed fields without the MongoDB Enterprise Advanced licensed crypt shared library.

        Parameters:
        bypassQueryAnalysis - whether the analysis of outgoing commands should be disabled.
        Returns:
        this
        Since:
        1.5
      • extraOptions

        public MongoCryptOptions.Builder extraOptions​(org.bson.BsonDocument extraOptions)
        The extraOptions that relate to the mongocryptd process or shared library.
        Parameters:
        extraOptions - the extraOptions
        Returns:
        this
        Since:
        1.5
      • searchPaths

        public MongoCryptOptions.Builder searchPaths​(java.util.List<java.lang.String> searchPaths)
        Sets search paths
        Parameters:
        searchPaths - sets search path
        Returns:
        this
        Since:
        1.5