Interface IRemoteCacheListener<K,V>
- All Superinterfaces:
ICacheListener<K,,V> Remote
- All Known Implementing Classes:
AbstractRemoteCacheListener,RemoteCacheListener,RemoteHttpClientListener
Listens for remote cache event notification ( rmi callback ).
-
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Deregistered itself.longGet the id to be used by this manager.This is for debugging.Gets the remoteType attribute of the IRemoteCacheListener 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) Set the id to be used by this manager.
-
Method Details
-
getListenerId
Get the id to be used by this manager.- Specified by:
getListenerIdin interfaceICacheListener<K,V> - Returns:
- long
- Throws:
IOException
-
setListenerId
Set the id to be used by this manager. The remote cache server identifies clients by this id. The value will be set by the server through the remote cache listener.- Specified by:
setListenerIdin interfaceICacheListener<K,V> - Parameters:
id-- Throws:
IOException
-
handlePut
Notifies the subscribers for a cache entry update.- Specified by:
handlePutin interfaceICacheListener<K,V> - Parameters:
item-- Throws:
IOException
-
handleRemove
Notifies the subscribers for a cache entry removal.- Specified by:
handleRemovein interfaceICacheListener<K,V> - Parameters:
cacheName-key-- Throws:
IOException
-
handleRemoveAll
Notifies the subscribers for a cache remove-all.- Specified by:
handleRemoveAllin interfaceICacheListener<K,V> - Parameters:
cacheName-- Throws:
IOException
-
handleDispose
Notifies the subscribers for freeing up the named cache.- Specified by:
handleDisposein interfaceICacheListener<K,V> - Parameters:
cacheName-- Throws:
IOException
-
getRemoteType
Gets the remoteType attribute of the IRemoteCacheListener object- Returns:
- The remoteType value
- Throws:
IOException
-
getLocalHostAddress
This is for debugging. It allows the remote cache server to log the address of any listeners that register.- Returns:
- the local host address.
- Throws:
IOException
-
dispose
Deregistered itself.- Throws:
IOException
-