public class RepositoryConfigRepository extends AbstractRepository
| Modifier and Type | Field and Description |
|---|---|
static String |
ID
The repository identifier for the system repository that contains the configuration data.
|
logger| Constructor and Description |
|---|
RepositoryConfigRepository(RepositoryManager manager) |
| 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.
|
protected void |
initializeInternal() |
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.
|
protected void |
shutDownInternal() |
init, initialize, isInitialized, shutDownpublic static final String ID
public RepositoryConfigRepository(RepositoryManager manager)
public void setDataDir(File dataDir)
RepositorydataDir - the directory where data for this repository is storedpublic File getDataDir()
Repositorypublic boolean isWritable()
throws RepositoryException
RepositoryRepositoryExceptionpublic ValueFactory getValueFactory()
Repositoryprotected void initializeInternal()
throws RepositoryException
initializeInternal in class AbstractRepositoryRepositoryExceptionprotected void shutDownInternal()
throws RepositoryException
shutDownInternal in class AbstractRepositoryRepositoryExceptionpublic RepositoryConnection getConnection() throws RepositoryException
Repository
try (RepositoryConnection conn = repository.getConnection()) {
// perform operations on the connection
}
Note that RepositoryConnection is not guaranteed to be thread-safe! The recommended pattern for
repository access in a multi-threaded application is to share the Repository object between threads, but have
each thread create and use its own RepositoryConnections.RepositoryException - If something went wrong during the creation of the Connection.Copyright © 2015-2020 Eclipse Foundation. All Rights Reserved.