Package com.adaptris.core.services.cache
Class CacheConnection
- java.lang.Object
-
- com.adaptris.core.AdaptrisConnectionImp
-
- com.adaptris.core.services.cache.CacheConnection
-
- All Implemented Interfaces:
AdaptrisComponent
,AdaptrisConnection
,CacheProvider
,ComponentLifecycle
,ComponentLifecycleExtension
,StateManagedComponent
public class CacheConnection extends AdaptrisConnectionImp implements CacheProvider
A Connection to a cache instance.In the adapter configuration file this class is aliased as cache-connection which is the preferred alternative to the fully qualified classname when building your configuration.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.AdaptrisConnectionImp
log
-
-
Constructor Summary
Constructors Constructor Description CacheConnection()
CacheConnection(Cache cache)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
closeConnection()
Close the underlying connection.Cache
getCacheInstance()
protected void
initConnection()
Initialise the underlying connection.protected void
prepareConnection()
Cache
retrieveCache()
void
setCacheInstance(Cache cache)
protected void
startConnection()
Start the underlying connection.protected void
stopConnection()
Stop the underlying connection.CacheConnection
withCacheInstance(Cache cache)
-
Methods inherited from class com.adaptris.core.AdaptrisConnectionImp
addExceptionListener, addMessageConsumer, addMessageProducer, changeState, cloneForTesting, close, connectionErrorHandler, getConnectionErrorHandler, getUniqueId, getWorkersFirstOnShutdown, init, prepare, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, retrieveConnection, retrieveExceptionListeners, retrieveMessageConsumers, retrieveMessageProducers, setConnectionErrorHandler, setUniqueId, setWorkersFirstOnShutdown, start, stop, workersFirstOnShutdown
-
-
-
-
Constructor Detail
-
CacheConnection
public CacheConnection()
-
CacheConnection
public CacheConnection(Cache cache)
-
-
Method Detail
-
prepareConnection
protected void prepareConnection() throws CoreException
- Specified by:
prepareConnection
in classAdaptrisConnectionImp
- Throws:
CoreException
-
initConnection
protected void initConnection() throws CoreException
Description copied from class:AdaptrisConnectionImp
Initialise the underlying connection.- Specified by:
initConnection
in classAdaptrisConnectionImp
- Throws:
CoreException
- wrapping any exception.
-
startConnection
protected void startConnection() throws CoreException
Description copied from class:AdaptrisConnectionImp
Start the underlying connection.- Specified by:
startConnection
in classAdaptrisConnectionImp
- Throws:
CoreException
- wrapping any exception.
-
stopConnection
protected void stopConnection()
Description copied from class:AdaptrisConnectionImp
Stop the underlying connection.- Specified by:
stopConnection
in classAdaptrisConnectionImp
-
closeConnection
protected void closeConnection()
Description copied from class:AdaptrisConnectionImp
Close the underlying connection.- Specified by:
closeConnection
in classAdaptrisConnectionImp
-
getCacheInstance
public Cache getCacheInstance()
-
setCacheInstance
public void setCacheInstance(Cache cache)
-
withCacheInstance
public CacheConnection withCacheInstance(Cache cache)
-
retrieveCache
public Cache retrieveCache()
- Specified by:
retrieveCache
in interfaceCacheProvider
-
-