Package com.couchbase.lite
Class DatabaseConfiguration
- java.lang.Object
-
- com.couchbase.lite.DatabaseConfiguration
-
public final class DatabaseConfiguration extends Object
Configuration for opening a database.
-
-
Constructor Summary
Constructors Constructor Description DatabaseConfiguration()DatabaseConfiguration(DatabaseConfiguration config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDirectory()Returns the path to the directory that contains the database.DatabaseConfigurationsetDirectory(String directory)Set the canonical path of the directory to store the database in.
-
-
-
Constructor Detail
-
DatabaseConfiguration
public DatabaseConfiguration()
-
DatabaseConfiguration
public DatabaseConfiguration(@Nullable DatabaseConfiguration config)
-
-
Method Detail
-
setDirectory
@NonNull public DatabaseConfiguration setDirectory(@NonNull String directory)
Set the canonical path of the directory to store the database in. If the directory doesn't already exist it will be created. If it cannot be created throw an IllegalStateException- Parameters:
directory- the directory- Returns:
- this.
- Throws:
IllegalStateException- if the directory does not exist anc cannot be created
-
getDirectory
@NonNull public String getDirectory()
Returns the path to the directory that contains the database. If this path has not been set explicitly (see:setDirectorybelow), then it is the system default.- Returns:
- the database directory
-
-