public final class DatabaseConfiguration extends Object
Constructor and Description |
---|
DatabaseConfiguration() |
DatabaseConfiguration(DatabaseConfiguration config) |
Modifier and Type | Method and Description |
---|---|
String |
getDirectory()
Returns the path to the directory that contains the database.
|
EncryptionKey |
getEncryptionKey()
ENTERPRISE EDITION API
|
DatabaseConfiguration |
setDirectory(String directory)
Set the canonical path of the directory to store the database in.
|
DatabaseConfiguration |
setEncryptionKey(EncryptionKey encryptionKey)
ENTERPRISE EDITION API
|
public DatabaseConfiguration()
public DatabaseConfiguration(@Nullable DatabaseConfiguration config)
@NonNull public DatabaseConfiguration setEncryptionKey(@Nullable EncryptionKey encryptionKey)
Set a key to encrypt the database with. If the database does not exist and is being created, it will use this key, and the same key must be given every time it's opened
encryptionKey
- the key@Nullable public EncryptionKey getEncryptionKey()
Returns a key to encrypt the database with.
@NonNull public DatabaseConfiguration setDirectory(@NonNull String directory)
directory
- the directoryIllegalStateException
- if the directory does not exist anc cannot be created@NonNull public String getDirectory()
setDirectory
below),
then it is the system default.