net.sf.ehcache.distribution
public abstract class RMICacheManagerPeerProvider extends Object implements CacheManagerPeerProvider
Version: $Id: RMICacheManagerPeerProvider.java 100 2006-05-30 08:19:29Z gregluck $
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(CacheManager cacheManager)
Constructor
| |
RMICacheManagerPeerProvider()
Empty constructor |
Method Summary | |
---|---|
void | dispose()
Providers may be doing all sorts of exotic things and need to be able to clean up on dispose.
|
static String | extractCacheName(String rmiUrl)
Gets the cache name out of the url |
CacheManager | getCacheManager()
The cacheManager this provider is bound to |
abstract void | init() |
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
|
Parameters: cacheManager
Throws: net.sf.ehcache.CacheException
Parameters: rmiUrl
Returns: the cache name as it would appear in ehcache.xml
Returns: a list of CachePeer peers for the given cache, excluding the local peer.
Parameters: rmiUrl
Parameters: date the date the entry was created
Returns: true if stale
Parameters: rmiUrl