|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.ehcache.distribution.JNDIManualRMICacheManagerPeerProvider
public class JNDIManualRMICacheManagerPeerProvider
A provider of RMI CachePeers through JNDI lookup.
The design allows for a peer server to go down. When it is up again the peer will be provided again. The JNDI Context and the CachePeers are cached locally. When listRemoteCachePeers is called each CachePeer is tested for staleness. If it is stale, the peer is looked up again in JNDI.
Field Summary | |
---|---|
protected java.util.Map |
cachePeers
CachePeers keyed by jndiProviderUrl |
protected java.util.Map |
peerUrls
Contains registered JNDI URLs as keys to their Context |
Constructor Summary | |
---|---|
JNDIManualRMICacheManagerPeerProvider(boolean isStashContexts,
boolean isStashRemoteCachePeers)
Constructor |
|
JNDIManualRMICacheManagerPeerProvider(CacheManager cacheManager)
Constructor |
Method Summary | |
---|---|
void |
dispose()
Providers may be doing all sorts of exotic things and need to be able to clean up on dispose. |
CacheManager |
getCacheManager()
The cacheManager this provider is bound to |
long |
getTimeForClusterToForm()
Time for a cluster to form. |
void |
init()
Notifies providers to initialise themselves. |
java.util.List |
listRemoteCachePeers(Ehcache cache)
|
void |
registerPeer(java.lang.String jndiProviderUrl)
Register a new peer |
java.lang.String |
toString()
Returns a string representation of the object. |
void |
unregisterPeer(java.lang.String jndiProviderUrl)
Unregisters a peer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.util.Map peerUrls
protected java.util.Map cachePeers
Constructor Detail |
---|
public JNDIManualRMICacheManagerPeerProvider(boolean isStashContexts, boolean isStashRemoteCachePeers)
isStashRemoteCachePeers
- isStashContexts
- public JNDIManualRMICacheManagerPeerProvider(CacheManager cacheManager)
cacheManager
- Method Detail |
---|
public void init()
init
in interface CacheManagerPeerProvider
CacheException
public void registerPeer(java.lang.String jndiProviderUrl)
registerPeer
in interface CacheManagerPeerProvider
jndiProviderUrl
- public void unregisterPeer(java.lang.String jndiProviderUrl)
unregisterPeer
in interface CacheManagerPeerProvider
jndiProviderUrl
- public java.util.List listRemoteCachePeers(Ehcache cache) throws CacheException
listRemoteCachePeers
in interface CacheManagerPeerProvider
CachePeer
peers, excluding the local peer.
CacheException
public void dispose() throws CacheException
dispose
in interface CacheManagerPeerProvider
CacheException
public long getTimeForClusterToForm()
getTimeForClusterToForm
in interface CacheManagerPeerProvider
public CacheManager getCacheManager()
public java.lang.String toString()
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class java.lang.Object
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |