|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.distribution.RMICacheManagerPeerListener
public final class RMICacheManagerPeerListener
A cache server which exposes available cache operations remotely through RMI.
It acts as a Decorator to a Cache. It holds an instance of cache, which is a local cache it talks to. This class could specify a security manager with code like: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.
Constructor Summary | |
---|---|
RMICacheManagerPeerListener(java.lang.String hostName,
java.lang.Integer port,
CacheManager cacheManager,
java.lang.Integer socketTimeoutMillis)
Constructor with full arguments. |
Method Summary | |
---|---|
void |
dispose()
Stop the listener. |
java.util.List |
getBoundCachePeers()
All of the caches which are listenting for remote changes. |
(package private) java.util.List |
getCachePeers()
Gets a list of cache peers |
void |
init()
Call to start the listeners and do any other network initialisation. |
(package private) java.lang.String[] |
listBoundRMICachePeers()
Returns a list of bound objects. |
(package private) java.rmi.Remote |
lookupPeer(java.lang.String name)
Returns a reference to the remote object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RMICacheManagerPeerListener(java.lang.String hostName, java.lang.Integer port, CacheManager cacheManager, java.lang.Integer socketTimeoutMillis) throws java.net.UnknownHostException
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 - 65536cacheManager
- the CacheManager this listener belongs tosocketTimeoutMillis
- TCP/IP Socket timeout when waiting on response
java.net.UnknownHostException
Method Detail |
---|
public final void init() throws CacheException
init
in interface CacheManagerPeerListener
CacheException
final java.lang.String[] listBoundRMICachePeers() throws CacheException
RMICachePeer
objects
CacheException
final java.rmi.Remote lookupPeer(java.lang.String name) throws CacheException
name
- the name of the cache e.g. sampleCache1
CacheException
public final void dispose() throws CacheException
dispose
in interface CacheManagerPeerListener
CacheException
public final java.util.List getBoundCachePeers()
getBoundCachePeers
in interface CacheManagerPeerListener
RMICachePeer
objectsfinal java.util.List getCachePeers()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |