Interface ICacheListener<K,V>
- All Known Subinterfaces:
ILateralCacheListener<K,,V> IRemoteCacheListener<K,V>
- All Known Implementing Classes:
AbstractDiskCache.MyCacheListener,AbstractRemoteCacheListener,CacheAdaptor,LateralTCPListener,RemoteCacheListener,RemoteHttpClientListener
public interface ICacheListener<K,V>
Used to receive a cache event notification.
Note: objects which implement this interface are local listeners to cache changes, whereas objects which implement IRmiCacheListener are remote listeners to cache changes.
-
Method Summary
Modifier and TypeMethodDescriptionlongGets the listenerId attribute of the ICacheListener objectvoidhandleDispose(String cacheName) Notifies the subscribers for freeing up the named cache.voidhandlePut(ICacheElement<K, V> item) Notifies the subscribers for a cache entry update.voidhandleRemove(String cacheName, K key) Notifies the subscribers for a cache entry removal.voidhandleRemoveAll(String cacheName) Notifies the subscribers for a cache remove-all.voidsetListenerId(long id) sets unique identifier of listener home
-
Method Details
-
handlePut
Notifies the subscribers for a cache entry update.- Parameters:
item-- Throws:
IOException
-
handleRemove
Notifies the subscribers for a cache entry removal.- Parameters:
cacheName-key-- Throws:
IOException
-
handleRemoveAll
Notifies the subscribers for a cache remove-all.- Parameters:
cacheName-- Throws:
IOException
-
handleDispose
Notifies the subscribers for freeing up the named cache.- Parameters:
cacheName-- Throws:
IOException
-
setListenerId
sets unique identifier of listener home- Parameters:
id- The new listenerId value- Throws:
IOException
-
getListenerId
Gets the listenerId attribute of the ICacheListener object- Returns:
- The listenerId value
- Throws:
IOException
-