protected class AbstractDiskCache.MyCacheListener extends Object implements ICacheListener<K,V>
| Modifier | Constructor and Description |
|---|---|
protected |
MyCacheListener() |
| Modifier and Type | Method and Description |
|---|---|
long |
getListenerId()
Gets the listenerId attribute of the ICacheListener object
|
void |
handleDispose(String cacheName)
Notifies the subscribers for freeing up the named cache.
|
void |
handlePut(ICacheElement<K,V> element)
Notifies the subscribers for a cache entry update.
|
void |
handleRemove(String cacheName,
K key)
Notifies the subscribers for a cache entry removal.
|
void |
handleRemoveAll(String cacheName)
Notifies the subscribers for a cache remove-all.
|
void |
setListenerId(long id)
sets unique identifier of listener home
|
public long getListenerId()
throws IOException
ICacheListenergetListenerId in interface ICacheListener<K,V>IOExceptionICacheListener.getListenerId()public void setListenerId(long id)
throws IOException
ICacheListenersetListenerId in interface ICacheListener<K,V>id - IOExceptionICacheListener.setListenerId(long)public void handlePut(ICacheElement<K,V> element) throws IOException
ICacheListenerhandlePut in interface ICacheListener<K,V>element - IOExceptionNOTE: This checks if the element is a puratory element and
behaves differently depending. However since we have control over how elements are
added to the cache event queue, that may not be needed ( they are always
PurgatoryElements ).public void handleRemove(String cacheName, K key) throws IOException
ICacheListenerhandleRemove in interface ICacheListener<K,V>cacheName - key - IOExceptionICacheListener.handleRemove(java.lang.String, K)public void handleRemoveAll(String cacheName) throws IOException
ICacheListenerhandleRemoveAll in interface ICacheListener<K,V>cacheName - IOExceptionICacheListener.handleRemoveAll(java.lang.String)public void handleDispose(String cacheName) throws IOException
ICacheListenerhandleDispose in interface ICacheListener<K,V>cacheName - IOExceptionICacheListener.handleDispose(java.lang.String)Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.