net.sf.ehcache.distribution
public final class RMICacheManagerPeerListener extends Object implements CacheManagerPeerListener
if (System.getSecurityManager() == null) { System.setSecurityManager(new RMISecurityManager()); }Doing so would require the addition of
grant
statements in the java.policy
file.
Per the JDK documentation: "If no security manager is specified no class loading, by RMI clients or servers, is allowed,
aside from what can be found in the local CLASSPATH." The classpath of each instance of this class should have
all required classes to enable distribution, so no remote classloading is required or desirable. Accordingly,
no security manager is set and there are no special JVM configuration requirements.
Version: $Id: RMICacheManagerPeerListener.java 52 2006-04-24 14:50:03Z gregluck $
Constructor Summary | |
---|---|
RMICacheManagerPeerListener(String hostName, Integer port, CacheManager cacheManager, Integer socketTimeoutMillis)
Constructor with full arguments.
|
Method Summary | |
---|---|
void | dispose()
Stop the listener. |
List | getBoundCachePeers()
All of the caches which are listenting for remote changes.
|
List | getCachePeers()
Gets a list of cache peers |
void | init() |
String[] | listBoundRMICachePeers()
Returns a list of bound objects.
|
Remote | lookupPeer(String name)
Returns a reference to the remote object. |
Parameters: hostName may be null, in which case the hostName will be looked up. Machines with multiple interfaces should specify this if they do not want it to be the default NIC. port a port in the range 1025 - 65536 cacheManager the CacheManager this listener belongs to socketTimeoutMillis TCP/IP Socket timeout when waiting on response
Returns: a list of RMICachePeer
objects
Returns: a list of String representations of RMICachePeer
objects
Parameters: name the name of the cache e.g. sampleCache1