public interface Repository
Please note that a repository needs to be initialized before it can be used and that it should be shut down before it is discarded/garbage collected. Forgetting the latter can result in loss of data (depending on the Repository implementation)!
Modifier and Type | Method and Description |
---|---|
RepositoryConnection |
getConnection()
Opens a connection to this repository that can be used for querying and
updating the contents of the repository.
|
File |
getDataDir()
Get the directory where data and logging for this repository is stored.
|
ValueFactory |
getValueFactory()
Gets a ValueFactory for this Repository.
|
void |
initialize()
Initializes this repository.
|
boolean |
isInitialized()
Indicates if the Repository has been initialized.
|
boolean |
isWritable()
Checks whether this repository is writable, i.e.
|
void |
setDataDir(File dataDir)
Set the directory where data and logging for this repository is stored.
|
void |
shutDown()
Shuts the repository down, releasing any resources that it keeps hold of.
|
void setDataDir(File dataDir)
dataDir
- the directory where data for this repository is storedFile getDataDir()
void initialize() throws RepositoryException
RepositoryException
- If the initialization failed.boolean isInitialized()
void shutDown() throws RepositoryException
RepositoryException
boolean isWritable() throws RepositoryException
RepositoryException
RepositoryConnection getConnection() throws RepositoryException
Connection con = repository.getConnection(); try { // perform operations on the connection } finally { con.close(); }
RepositoryException
- If something went wrong during the creation of the Connection.ValueFactory getValueFactory()
Copyright © 2001-2016 Aduna. All Rights Reserved.