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 path to the directory to store the database in.
|
DatabaseConfiguration |
setEncryptionKey(EncryptionKey encryptionKey)
ENTERPRISE EDITION API
|
public DatabaseConfiguration()
public DatabaseConfiguration(@Nullable DatabaseConfiguration config)
@NonNull public DatabaseConfiguration setDirectory(@NonNull String directory)
directory
- the directory@NonNull public DatabaseConfiguration setEncryptionKey(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 keypublic EncryptionKey getEncryptionKey()
Returns a key to encrypt the database with.
@NonNull public String getDirectory()
setDirectory
below),
then it is the system default. If it has been set explicitly, then it also contains
the temporary directory that Couchbase uses as a scratch pad.