|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.ehcache.distribution.RMICacheManagerPeerProvider
public abstract class RMICacheManagerPeerProvider
A provider of Peer RMI addresses.
Field Summary | |
---|---|
protected CacheManager |
cacheManager
The CacheManager this peer provider is associated with. |
protected Map |
peerUrls
Contains a RMI URLs of the form: "//" + hostName + ":" + port + "/" + cacheName; |
Constructor Summary | |
---|---|
RMICacheManagerPeerProvider()
Empty constructor |
|
RMICacheManagerPeerProvider(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 |
String |
getScheme()
The replication scheme. |
abstract void |
init()
Notifies providers to initialise themselves. |
abstract List |
listRemoteCachePeers(Ehcache cache)
|
CachePeer |
lookupRemoteCachePeer(String url)
The use of one-time registry creation and Naming.rebind should mean we can create as many listeneres as we like. |
abstract void |
registerPeer(String rmiUrl)
Register a new peer |
protected abstract boolean |
stale(Date date)
Whether the entry should be considered stale. |
void |
unregisterPeer(String rmiUrl)
Unregisters a peer |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface net.sf.ehcache.distribution.CacheManagerPeerProvider |
---|
getTimeForClusterToForm |
Field Detail |
---|
protected final Map peerUrls
protected CacheManager cacheManager
Constructor Detail |
---|
public RMICacheManagerPeerProvider(CacheManager cacheManager)
cacheManager
- public RMICacheManagerPeerProvider()
Method Detail |
---|
public abstract void init()
init
in interface CacheManagerPeerProvider
public abstract void registerPeer(String rmiUrl)
registerPeer
in interface CacheManagerPeerProvider
rmiUrl
- public final void unregisterPeer(String rmiUrl)
unregisterPeer
in interface CacheManagerPeerProvider
rmiUrl
- public abstract List listRemoteCachePeers(Ehcache cache) throws CacheException
listRemoteCachePeers
in interface CacheManagerPeerProvider
CachePeer
peers for the given cache, excluding the local peer.
CacheException
protected abstract boolean stale(Date date)
date
- the date the entry was created
public CachePeer lookupRemoteCachePeer(String url) throws MalformedURLException, NotBoundException, RemoteException
MalformedURLException
NotBoundException
RemoteException
public void dispose() throws CacheException
dispose
in interface CacheManagerPeerProvider
CacheException
public final CacheManager getCacheManager()
public String getScheme()
CacheReplicator
should lookup
the provider for its scheme type during replication. Similarly a BootstrapCacheLoader
should also look up the provider for its scheme.
getScheme
in interface CacheManagerPeerProvider
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |