public static final class StoreConfig.Builder extends Object
StoreConfig.| 构造器 | 说明 |
|---|---|
Builder() |
Default constructor of the
Builder instance. |
Builder(StoreConfig storeConfig) |
A constructor used to create a
Builder instance with specified StoreConfig object. |
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
StoreConfig |
build() |
Creates a
StoreConfig instance using a builder with the specified configuration. |
StoreConfig.Builder |
setDatabaseFileSecurityLevel(DatabaseFileSecurityLevel databaseFileSecurityLevel) |
Sets a specified security level for the database file.
|
StoreConfig.Builder |
setDatabaseFileType(DatabaseFileType databaseFileType) |
Sets the database file type for the
StoreConfig object. |
StoreConfig.Builder |
setEncryptKey(byte[] encryptKey) |
Sets the encrypt key for the
StoreConfig object. |
StoreConfig.Builder |
setJournalMode(StoreConfig.JournalMode journalMode) |
Sets the journal mode for the
StoreConfig object. |
StoreConfig.Builder |
setName(String name) |
Sets the name for the
StoreConfig object. |
StoreConfig.Builder |
setReadOnly(boolean isReadOnly) |
Sets whether the database is read-only or not.
|
StoreConfig.Builder |
setStorageMode(StoreConfig.StorageMode storageMode) |
Sets the storage mode for the
StoreConfig object. |
StoreConfig.Builder |
setSyncMode(StoreConfig.SyncMode syncMode) |
Sets the synchronization mode for the
StoreConfig object. |
public Builder()
Builder instance.public Builder(StoreConfig storeConfig)
Builder instance with specified StoreConfig object.storeConfig - Indicates the StoreConfig object used to create the Builder instance.public StoreConfig.Builder setName(String name)
StoreConfig object.name - Indicates the database name to set.Builder instance for creating a StoreConfig with the specified database
name.public StoreConfig.Builder setStorageMode(StoreConfig.StorageMode storageMode)
StoreConfig object.storageMode - Indicates the storage mode to set.Builder instance for creating a StoreConfig with the specified storage
mode.public StoreConfig.Builder setJournalMode(StoreConfig.JournalMode journalMode)
StoreConfig object.journalMode - Indicates the journal mode to set.Builder instance for creating a StoreConfig with the specified journal
mode.StoreConfig.JournalModepublic StoreConfig.Builder setSyncMode(StoreConfig.SyncMode syncMode)
StoreConfig object.syncMode - Indicates the synchronization mode to set, as enumerated in SyncMode.Builder instance for creating a StoreConfig with the specified
synchronous mode.StoreConfig.SyncModepublic StoreConfig.Builder setEncryptKey(byte[] encryptKey)
StoreConfig object.encryptKey - Indicates the encrypt key to set.Builder instance for creating a StoreConfig with the specified encrypt
key.public StoreConfig.Builder setReadOnly(boolean isReadOnly)
isReadOnly - Indicates whether the database is read-only. The value true indicates
that the database is read-only, and value false indicates not.Builder instance for creating a StoreConfig with the specified
permission.public StoreConfig.Builder setDatabaseFileType(DatabaseFileType databaseFileType)
StoreConfig object.databaseFileType - Indicates the database file type to set, as enumerated in DatabaseFileType.Builder instance.public StoreConfig.Builder setDatabaseFileSecurityLevel(DatabaseFileSecurityLevel databaseFileSecurityLevel)
databaseFileSecurityLevel - Indicates the security level to set.Builder instance for creating a StoreConfig object with the specified
security level.DatabaseFileSecurityLevelpublic StoreConfig build()
StoreConfig instance using a builder with the specified configuration.StoreConfig instance.