public class InterceptingRepositoryWrapper extends RepositoryWrapper implements InterceptingRepository
InterceptingRepositoryConnectionWrapper| Constructor and Description | 
|---|
| InterceptingRepositoryWrapper() | 
| InterceptingRepositoryWrapper(Repository delegate) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)Registers a RepositoryConnectionInterceptor that will receive notifications of operations that are
 performed on any connections that are created by this repository. | 
| void | addRepositoryInterceptor(RepositoryInterceptor interceptor)Registers a RepositoryInterceptor that will receive notifications of operations that are performed on
 this repository. | 
| InterceptingRepositoryConnection | getConnection()Opens a connection to this repository that can be used for querying and updating the contents of the repository. | 
| void | initialize()Initializes this repository. | 
| void | removeRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)Removes a registered RepositoryConnectionInterceptor from this repository. | 
| void | removeRepositoryInterceptor(RepositoryInterceptor interceptor)Removes a registered RepositoryInterceptor from this repository. | 
| 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. | 
getDataDir, getDelegate, getValueFactory, isInitialized, isWritable, setDelegate, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDataDir, getValueFactory, init, isInitialized, isWritablepublic InterceptingRepositoryWrapper()
public InterceptingRepositoryWrapper(Repository delegate)
public void addRepositoryInterceptor(RepositoryInterceptor interceptor)
addRepositoryInterceptor in interface InterceptingRepositorypublic void removeRepositoryInterceptor(RepositoryInterceptor interceptor)
removeRepositoryInterceptor in interface InterceptingRepositorypublic void addRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
addRepositoryConnectionInterceptor in interface InterceptingRepositorypublic void removeRepositoryConnectionInterceptor(RepositoryConnectionInterceptor interceptor)
removeRepositoryConnectionInterceptor in interface InterceptingRepositorypublic InterceptingRepositoryConnection 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.getConnection in interface RepositorygetConnection in class RepositoryWrapperRepositoryException - If something went wrong during the creation of the Connection.public void initialize()
                throws RepositoryException
Repositoryinitialize in interface Repositoryinitialize in class RepositoryWrapperRepositoryException - If the initialization failed.public void setDataDir(File dataDir)
RepositorysetDataDir in interface RepositorysetDataDir in class RepositoryWrapperdataDir - the directory where data for this repository is storedpublic void shutDown()
              throws RepositoryException
RepositoryshutDown in interface RepositoryshutDown in class RepositoryWrapperRepositoryExceptionCopyright © 2015-2020 Eclipse Foundation. All Rights Reserved.