public class StoreConfig extends Object
SystemCapability.Data#DATA_APPDATAMGR| 限定符和类型 | 类 | 说明 |
|---|---|---|
static class |
StoreConfig.Builder |
Represents a builder of
StoreConfig. |
static class |
StoreConfig.JournalMode |
Describes journal modes of the database.
|
static class |
StoreConfig.StorageMode |
Enumerates the storage modes.
|
static class |
StoreConfig.SyncMode |
Enumerates the database synchronization modes.
|
| 限定符和类型 | 字段 | 说明 |
|---|---|---|
static int |
MAX_ENCRYPT_KEY_SIZE |
The max size of encrypt key.
|
| 限定符和类型 | 方法 | 说明 |
|---|---|---|
DatabaseFileSecurityLevel |
getDatabaseFileSecurityLevel() |
Obtains the security level of the database file.
|
DatabaseFileType |
getDatabaseFileType() |
Obtains the database file type in this
StoreConfig object. |
byte[] |
getEncryptKey() |
Obtains the encrypt key in this
StoreConfig object. |
StoreConfig.JournalMode |
getJournalMode() |
Obtains the journal mode in this
StoreConfig object. |
String |
getName() |
Obtains the database name.
|
StoreConfig.StorageMode |
getStorageMode() |
Obtains the storage mode.
|
StoreConfig.SyncMode |
getSyncMode() |
Obtains the synchronization mode in this
StoreConfig object. |
boolean |
isReadOnly() |
Checks whether the database is read-only.
|
static StoreConfig |
newDefaultConfig(String name) |
Creates a database configuration using the default configuration by specifying the database name.
|
static StoreConfig |
newMemoryConfig() |
Creates an in-memory database configuration.
|
static StoreConfig |
newReadOnlyConfig(String name) |
Creates a read-only database configuration by specifying the database name.
|
public static final int MAX_ENCRYPT_KEY_SIZE
public static StoreConfig newDefaultConfig(String name)
The database created using this configuration is in disk storage mode and is both readable and writable.
name - Indicates the database name.public static StoreConfig newMemoryConfig()
The database created using this configuration is in memory storage mode and is both readable and writable.
public static StoreConfig newReadOnlyConfig(String name)
The database created using this configuration is in disk storage mode.
name - Indicates the database name.public String getName()
public StoreConfig.StorageMode getStorageMode()
public StoreConfig.JournalMode getJournalMode()
StoreConfig object.StoreConfig object.StoreConfig.JournalModepublic StoreConfig.SyncMode getSyncMode()
StoreConfig object.StoreConfig object, as enumerated in SyncMode.StoreConfig.SyncModepublic byte[] getEncryptKey()
StoreConfig object.StoreConfig object.public boolean isReadOnly()
true if the database is read-only; returns false otherwise.public DatabaseFileType getDatabaseFileType()
StoreConfig object.DatabaseFileType.public DatabaseFileSecurityLevel getDatabaseFileSecurityLevel()
DatabaseFileSecurityLevel