org.apache.jcs.auxiliary.remote
Class RemoteCacheListener<K extends Serializable,V extends Serializable>

java.lang.Object
  extended by org.apache.jcs.auxiliary.remote.AbstractRemoteCacheListener<K,V>
      extended by org.apache.jcs.auxiliary.remote.RemoteCacheListener<K,V>
All Implemented Interfaces:
Serializable, Remote, IRemoteCacheConstants, IRemoteCacheListener<K,V>, ICacheListener<K,V>

public class RemoteCacheListener<K extends Serializable,V extends Serializable>
extends AbstractRemoteCacheListener<K,V>
implements IRemoteCacheConstants, Serializable, IRemoteCacheListener<K,V>

Registered with RemoteCache server. The server updates the local caches via this listener. Each server assigns a unique listener id for a listener.

One listener is used per remote cache server. The same listener is used for all the regions that talk to a particular server.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.apache.jcs.auxiliary.remote.AbstractRemoteCacheListener
cacheMgr, irca, listenerId, puts, removes
 
Fields inherited from interface org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheConstants
CACHE_SERVER_ATTRIBUTES_PROPERTY_PREFIX, CACHE_SERVER_PREFIX, CUSTOM_RMI_SOCKET_FACTORY_PROPERTY_PREFIX, PROPERTY_PREFIX, REMOTE_ALLOW_CLUSTER_GET, REMOTE_CACHE_SERVICE_NAME, REMOTE_CACHE_SERVICE_PORT, REMOTE_CACHE_SERVICE_VAL, REMOTE_LOCAL_CLUSTER_CONSISTENCY, SOCKET_TIMEOUT_MILLIS, TOMCAT_ON, TOMCAT_XML
 
Fields inherited from interface org.apache.jcs.auxiliary.remote.behavior.IRemoteCacheListener
CLIENT_LISTENER, SERVER_LISTENER
 
Constructor Summary
RemoteCacheListener(IRemoteCacheAttributes irca, ICompositeCacheManager cacheMgr)
          Only need one since it does work for all regions, just reference by multiple region names.
 
Method Summary
 void dispose()
          Deregister itself.
 String toString()
          For easier debugging.
 
Methods inherited from class org.apache.jcs.auxiliary.remote.AbstractRemoteCacheListener
getCacheManager, getListenerId, getLocalHostAddress, getRemoteType, handleDispose, handlePut, handleRemove, handleRemoveAll, setListenerId
 
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
getListenerId, getLocalHostAddress, getRemoteType, setListenerId
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICacheListener
handleDispose, handlePut, handleRemove, handleRemoveAll
 

Constructor Detail

RemoteCacheListener

public RemoteCacheListener(IRemoteCacheAttributes irca,
                           ICompositeCacheManager cacheMgr)
Only need one since it does work for all regions, just reference by multiple region names.

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.

Parameters:
irca -
cacheMgr -
Method Detail

dispose

public void dispose()
             throws IOException
Deregister itself.

Specified by:
dispose in interface IRemoteCacheListener<K extends Serializable,V extends Serializable>
Throws:
IOException

toString

public String toString()
For easier debugging.

Overrides:
toString in class AbstractRemoteCacheListener<K extends Serializable,V extends Serializable>
Returns:
Basic info on this listener.


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.