Package org.apache.commons.jcs3.engine
Class CacheAdaptor<K,V>
java.lang.Object
org.apache.commons.jcs3.engine.CacheAdaptor<K,V>
- All Implemented Interfaces:
ICacheListener<K,V>
Used for Cache-to-Cache messaging purposes. These are used in the balking
facades in the lateral and remote caches.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongGets the listenerId attribute of the CacheAdaptor objectvoidhandleDispose(String cacheName) Shutdown call.voidhandlePut(ICacheElement<K, V> item) Puts an item into the cache.voidhandleRemove(String cacheName, K key) Removes an item.voidhandleRemoveAll(String cacheName) Clears the region.voidsetListenerId(long id) Sets the listenerId attribute of the CacheAdaptor object
-
Constructor Details
-
CacheAdaptor
Constructor for the CacheAdaptor object- Parameters:
cache-
-
-
Method Details
-
setListenerId
Sets the listenerId attribute of the CacheAdaptor object- Specified by:
setListenerIdin interfaceICacheListener<K,V> - Parameters:
id- The new listenerId value- Throws:
IOException
-
getListenerId
Gets the listenerId attribute of the CacheAdaptor object- Specified by:
getListenerIdin interfaceICacheListener<K,V> - Returns:
- The listenerId value
- Throws:
IOException
-
handlePut
Puts an item into the cache.- Specified by:
handlePutin interfaceICacheListener<K,V> - Parameters:
item-- Throws:
IOException
-
handleRemove
Removes an item.- Specified by:
handleRemovein interfaceICacheListener<K,V> - Parameters:
cacheName-key-- Throws:
IOException
-
handleRemoveAll
Clears the region.- Specified by:
handleRemoveAllin interfaceICacheListener<K,V> - Parameters:
cacheName-- Throws:
IOException
-
handleDispose
Shutdown call.- Specified by:
handleDisposein interfaceICacheListener<K,V> - Parameters:
cacheName-- Throws:
IOException
-