|
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 standard (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,
InetAddress groupMulticastAddress,
Integer groupMulticastPort,
Integer timeToLive,
InetAddress hostAddress)
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. |
List |
listRemoteCachePeers(Ehcache cache)
|
void |
registerPeer(String rmiUrl)
Register a new peer, but only if the peer is new, otherwise the last seen timestamp is updated. |
protected boolean |
stale(Date date)
Whether the entry should be considered stale. |
Methods inherited from class net.sf.ehcache.distribution.RMICacheManagerPeerProvider |
---|
getCacheManager, getScheme, 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 |
---|
getScheme, unregisterPeer |
Field Detail |
---|
protected static final int SHORT_DELAY
Constructor Detail |
---|
public MulticastRMICacheManagerPeerProvider(CacheManager cacheManager, InetAddress groupMulticastAddress, Integer groupMulticastPort, Integer timeToLive, InetAddress hostAddress)
groupMulticastAddress
- 224.0.0.1 to 239.255.255.255 e.g. 230.0.0.1groupMulticastPort
- 1025 to 65536 e.g. 4446hostAddress
- the address of the interface to use for sending and receiving multicast. May be null.Method Detail |
---|
public final void init() throws CacheException
init
in interface CacheManagerPeerProvider
init
in class RMICacheManagerPeerProvider
CacheException
public final void registerPeer(String rmiUrl)
registerPeer
in interface CacheManagerPeerProvider
registerPeer
in class RMICacheManagerPeerProvider
rmiUrl
- public final 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(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 |