|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jcs.auxiliary.remote.AbstractRemoteCacheListener<K,V>
public abstract class AbstractRemoteCacheListener<K extends Serializable,V extends Serializable>
Shared listener base.
| Field Summary | |
|---|---|
protected ICompositeCacheManager |
cacheMgr
The cache manager used to put items in different regions. |
protected IRemoteCacheAttributes |
irca
The remote cache configuration object. |
protected long |
listenerId
This is set by the remote cache server. |
protected int |
puts
Number of put requests received. |
protected int |
removes
Number of remove requests received. |
| Fields inherited from interface org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener |
|---|
CLIENT_LISTENER, SERVER_LISTENER |
| Constructor Summary | |
|---|---|
AbstractRemoteCacheListener(IRemoteCacheAttributes irca,
ICompositeCacheManager cacheMgr)
Only need one since it does work for all regions, just reference by multiple region names. |
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener |
|---|
dispose |
| Field Detail |
|---|
protected transient ICompositeCacheManager cacheMgr
protected IRemoteCacheAttributes irca
protected int puts
protected int removes
protected long listenerId
| Constructor Detail |
|---|
public AbstractRemoteCacheListener(IRemoteCacheAttributes irca,
ICompositeCacheManager cacheMgr)
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 - cacheMgr - | Method Detail |
|---|
public void setListenerId(long id)
throws IOException
setListenerId in interface IRemoteCacheListener<K extends Serializable,V extends Serializable>setListenerId in interface ICacheListener<K extends Serializable,V extends Serializable>id - The new listenerId value
IOException
public long getListenerId()
throws IOException
getListenerId in interface IRemoteCacheListener<K extends Serializable,V extends Serializable>getListenerId in interface ICacheListener<K extends Serializable,V extends Serializable>IOException
public RemoteType getRemoteType()
throws IOException
getRemoteType in interface IRemoteCacheListener<K extends Serializable,V extends Serializable>IOException
public void handlePut(ICacheElement<K,V> cb)
throws IOException
If remove on put is not configured, then update the item.
handlePut in interface ICacheListener<K extends Serializable,V extends Serializable>cb -
IOException
public void handleRemove(String cacheName,
K key)
throws IOException
handleRemove in interface ICacheListener<K extends Serializable,V extends Serializable>cacheName - key -
IOException
public void handleRemoveAll(String cacheName)
throws IOException
handleRemoveAll in interface ICacheListener<K extends Serializable,V extends Serializable>cacheName -
IOException
public void handleDispose(String cacheName)
throws IOException
ICacheListener
handleDispose in interface ICacheListener<K extends Serializable,V extends Serializable>cacheName -
IOExceptionprotected ICompositeCacheManager getCacheManager()
public String getLocalHostAddress()
throws IOException
getLocalHostAddress in interface IRemoteCacheListener<K extends Serializable,V extends Serializable>IOExceptionpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||