public abstract class AbstractRemoteCacheListener<K,V> extends Object implements IRemoteCacheListener<K,V>
| Constructor and Description |
|---|
AbstractRemoteCacheListener(IRemoteCacheAttributes irca,
ICompositeCacheManager cacheMgr,
IElementSerializer elementSerializer)
Only need one since it does work for all regions, just reference by multiple region names.
|
| Modifier and Type | Method and Description |
|---|---|
protected ICompositeCacheManager |
getCacheManager()
Gets the cacheManager attribute of the RemoteCacheListener object.
|
long |
getListenerId()
Gets the listenerId attribute of the RemoteCacheListener object.
|
String |
getLocalHostAddress()
This is for debugging.
|
RemoteType |
getRemoteType()
Gets the remoteType attribute of the RemoteCacheListener object
|
void |
handleDispose(String cacheName)
Notifies the subscribers for freeing up the named cache.
|
void |
handlePut(ICacheElement<K,V> cb)
If this is configured to remove on put, then remove the element since it has been updated
elsewhere. cd should be incomplete for faster transmission.
|
void |
handleRemove(String cacheName,
K key)
Calls localRemove on the CompositeCache.
|
void |
handleRemoveAll(String cacheName)
Calls localRemoveAll on the CompositeCache.
|
void |
setListenerId(long id)
Let the remote cache set a listener_id.
|
String |
toString()
For easier debugging.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdisposepublic AbstractRemoteCacheListener(IRemoteCacheAttributes irca, ICompositeCacheManager cacheMgr, IElementSerializer elementSerializer)
The constructor exports this object, making it available to receive incoming calls. The callback port is anonymous unless a local port value was specified in the configuration.
irca - cache configurationcacheMgr - the cache hubelementSerializer - a custom serializerpublic void setListenerId(long id)
throws IOException
setListenerId in interface IRemoteCacheListener<K,V>setListenerId in interface ICacheListener<K,V>id - The new listenerId valueIOExceptionpublic long getListenerId()
throws IOException
getListenerId in interface IRemoteCacheListener<K,V>getListenerId in interface ICacheListener<K,V>IOExceptionpublic RemoteType getRemoteType() throws IOException
getRemoteType in interface IRemoteCacheListener<K,V>IOExceptionpublic void handlePut(ICacheElement<K,V> cb) throws IOException
If remove on put is not configured, then update the item.
handlePut in interface ICacheListener<K,V>cb - IOExceptionpublic void handleRemove(String cacheName, K key) throws IOException
handleRemove in interface ICacheListener<K,V>cacheName - key - IOExceptionpublic void handleRemoveAll(String cacheName) throws IOException
handleRemoveAll in interface ICacheListener<K,V>cacheName - IOExceptionpublic void handleDispose(String cacheName) throws IOException
ICacheListenerhandleDispose in interface ICacheListener<K,V>cacheName - IOExceptionprotected ICompositeCacheManager getCacheManager()
public String getLocalHostAddress() throws IOException
getLocalHostAddress in interface IRemoteCacheListener<K,V>IOExceptionCopyright © 2002–2022 The Apache Software Foundation. All rights reserved.