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 TypeMethodDescriptionvoid
dispose()
Deregistered itself.long
Get the id to be used by this manager.This is for debugging.Gets the remoteType attribute of the IRemoteCacheListener objectvoid
handleDispose
(String cacheName) Notifies the subscribers for freeing up the named cache.void
handlePut
(ICacheElement<K, V> item) 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) Set the id to be used by this manager.
-
Method Details
-
getListenerId
Get the id to be used by this manager.- Specified by:
getListenerId
in 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:
setListenerId
in interfaceICacheListener<K,
V> - Parameters:
id
-- Throws:
IOException
-
handlePut
Notifies the subscribers for a cache entry update.- Specified by:
handlePut
in interfaceICacheListener<K,
V> - Parameters:
item
-- Throws:
IOException
-
handleRemove
Notifies the subscribers for a cache entry removal.- Specified by:
handleRemove
in interfaceICacheListener<K,
V> - Parameters:
cacheName
-key
-- Throws:
IOException
-
handleRemoveAll
Notifies the subscribers for a cache remove-all.- Specified by:
handleRemoveAll
in interfaceICacheListener<K,
V> - Parameters:
cacheName
-- Throws:
IOException
-
handleDispose
Notifies the subscribers for freeing up the named cache.- Specified by:
handleDispose
in 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
-