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 voidcloseConnection()Close the underlying connection.CachegetCacheInstance()protected voidinitConnection()Initialise the underlying connection.protected voidprepareConnection()CacheretrieveCache()voidsetCacheInstance(Cache cache)protected voidstartConnection()Start the underlying connection.protected voidstopConnection()Stop the underlying connection.CacheConnectionwithCacheInstance(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:
prepareConnectionin classAdaptrisConnectionImp- Throws:
CoreException
-
initConnection
protected void initConnection() throws CoreExceptionDescription copied from class:AdaptrisConnectionImpInitialise the underlying connection.- Specified by:
initConnectionin classAdaptrisConnectionImp- Throws:
CoreException- wrapping any exception.
-
startConnection
protected void startConnection() throws CoreExceptionDescription copied from class:AdaptrisConnectionImpStart the underlying connection.- Specified by:
startConnectionin classAdaptrisConnectionImp- Throws:
CoreException- wrapping any exception.
-
stopConnection
protected void stopConnection()
Description copied from class:AdaptrisConnectionImpStop the underlying connection.- Specified by:
stopConnectionin classAdaptrisConnectionImp
-
closeConnection
protected void closeConnection()
Description copied from class:AdaptrisConnectionImpClose the underlying connection.- Specified by:
closeConnectionin classAdaptrisConnectionImp
-
getCacheInstance
public Cache getCacheInstance()
-
setCacheInstance
public void setCacheInstance(Cache cache)
-
withCacheInstance
public CacheConnection withCacheInstance(Cache cache)
-
retrieveCache
public Cache retrieveCache()
- Specified by:
retrieveCachein interfaceCacheProvider
-
-