|
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 net.sf.ehcache.distribution.MulticastRMICacheManagerPeerProvider
public final class MulticastRMICacheManagerPeerProvider
A peer provider which discovers peers using Multicast.
Hosts can be in three different levels of conformance with the Multicast specification (RFC1112), according to the requirements they meet.
Nested Class Summary | |
---|---|
protected static class |
MulticastRMICacheManagerPeerProvider.CachePeerEntry
Entry containing a looked up CachePeer and date |
Field Summary | |
---|---|
protected static int |
SHORT_DELAY
One tenth of a second, in ms |
Fields inherited from class net.sf.ehcache.distribution.RMICacheManagerPeerProvider |
---|
cacheManager, peerUrls |
Constructor Summary | |
---|---|
MulticastRMICacheManagerPeerProvider(CacheManager cacheManager,
java.net.InetAddress groupMulticastAddress,
java.lang.Integer groupMulticastPort,
java.lang.Integer timeToLive)
Creates and starts a multicast peer provider |
Method Summary | |
---|---|
void |
dispose()
Shutdown the heartbeat |
MulticastKeepaliveHeartbeatReceiver |
getHeartBeatReceiver()
|
MulticastKeepaliveHeartbeatSender |
getHeartBeatSender()
|
protected long |
getStaleTime()
The time after which an unrefreshed peer provider entry is considered stale. |
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 rmiUrl)
Register a new peer, but only if the peer is new, otherwise the last seen timestamp is updated. |
protected boolean |
stale(java.util.Date date)
Whether the entry should be considered stale. |
Methods inherited from class net.sf.ehcache.distribution.RMICacheManagerPeerProvider |
---|
extractCacheName, getCacheManager, lookupRemoteCachePeer, unregisterPeer |
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 |
---|
unregisterPeer |
Field Detail |
---|
protected static final int SHORT_DELAY
Constructor Detail |
---|
public MulticastRMICacheManagerPeerProvider(CacheManager cacheManager, java.net.InetAddress groupMulticastAddress, java.lang.Integer groupMulticastPort, java.lang.Integer timeToLive)
groupMulticastAddress
- 224.0.0.1 to 239.255.255.255 e.g. 230.0.0.1groupMulticastPort
- 1025 to 65536 e.g. 4446Method Detail |
---|
public final void init() throws CacheException
init
in interface CacheManagerPeerProvider
init
in class RMICacheManagerPeerProvider
CacheException
public final void registerPeer(java.lang.String rmiUrl)
registerPeer
in interface CacheManagerPeerProvider
registerPeer
in class RMICacheManagerPeerProvider
rmiUrl
- public final java.util.List listRemoteCachePeers(Ehcache cache) throws CacheException
listRemoteCachePeers
in interface CacheManagerPeerProvider
listRemoteCachePeers
in class RMICacheManagerPeerProvider
CachePeer
peers, excluding the local peer.
CacheException
public final void dispose()
dispose
in interface CacheManagerPeerProvider
dispose
in class RMICacheManagerPeerProvider
public long getTimeForClusterToForm()
getTimeForClusterToForm
in interface CacheManagerPeerProvider
protected long getStaleTime()
protected final boolean stale(java.util.Date date)
stale
in class RMICacheManagerPeerProvider
date
- the date the entry was created
public MulticastKeepaliveHeartbeatReceiver getHeartBeatReceiver()
public MulticastKeepaliveHeartbeatSender getHeartBeatSender()
|
ehcache | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |