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 TypeMethodDescriptionlong
Gets the listenerId attribute of the CacheAdaptor objectvoid
handleDispose
(String cacheName) Shutdown call.void
handlePut
(ICacheElement<K, V> item) Puts an item into the cache.void
handleRemove
(String cacheName, K key) Removes an item.void
handleRemoveAll
(String cacheName) Clears the region.void
setListenerId
(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:
setListenerId
in interfaceICacheListener<K,
V> - Parameters:
id
- The new listenerId value- Throws:
IOException
-
getListenerId
Gets the listenerId attribute of the CacheAdaptor object- Specified by:
getListenerId
in interfaceICacheListener<K,
V> - Returns:
- The listenerId value
- Throws:
IOException
-
handlePut
Puts an item into the cache.- Specified by:
handlePut
in interfaceICacheListener<K,
V> - Parameters:
item
-- Throws:
IOException
-
handleRemove
Removes an item.- Specified by:
handleRemove
in interfaceICacheListener<K,
V> - Parameters:
cacheName
-key
-- Throws:
IOException
-
handleRemoveAll
Clears the region.- Specified by:
handleRemoveAll
in interfaceICacheListener<K,
V> - Parameters:
cacheName
-- Throws:
IOException
-
handleDispose
Shutdown call.- Specified by:
handleDispose
in interfaceICacheListener<K,
V> - Parameters:
cacheName
-- Throws:
IOException
-