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, shutDown
public static final String ID
public RepositoryConfigRepository(RepositoryManager manager)
public void setDataDir(File dataDir)
Repository
dataDir
- the directory where data for this repository is storedpublic File getDataDir()
Repository
public boolean isWritable() throws RepositoryException
Repository
RepositoryException
public ValueFactory getValueFactory()
Repository
protected void initializeInternal() throws RepositoryException
initializeInternal
in class AbstractRepository
RepositoryException
protected void shutDownInternal() throws RepositoryException
shutDownInternal
in class AbstractRepository
RepositoryException
public 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 RepositoryConnection
s.RepositoryException
- If something went wrong during the creation of the Connection.Copyright © 2015-2022 Eclipse Foundation. All Rights Reserved.