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
|
protected MyCacheListener()
public long getListenerId() throws IOException
ICacheListener
getListenerId
in interface ICacheListener<K,V>
IOException
ICacheListener.getListenerId()
public void setListenerId(long id) throws IOException
ICacheListener
setListenerId
in interface ICacheListener<K,V>
id
- IOException
ICacheListener.setListenerId(long)
public void handlePut(ICacheElement<K,V> element) throws IOException
ICacheListener
handlePut
in interface ICacheListener<K,V>
element
- IOException
NOTE: 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
ICacheListener
handleRemove
in interface ICacheListener<K,V>
cacheName
- key
- IOException
ICacheListener.handleRemove(java.lang.String, K)
public void handleRemoveAll(String cacheName) throws IOException
ICacheListener
handleRemoveAll
in interface ICacheListener<K,V>
cacheName
- IOException
ICacheListener.handleRemoveAll(java.lang.String)
public void handleDispose(String cacheName) throws IOException
ICacheListener
handleDispose
in interface ICacheListener<K,V>
cacheName
- IOException
ICacheListener.handleDispose(java.lang.String)
Copyright © 2002–2018 The Apache Software Foundation. All rights reserved.