| java.lang.Object net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatSender
MulticastKeepaliveHeartbeatSender | final public class MulticastKeepaliveHeartbeatSender (Code) | | Sends heartbeats to a multicast group containing a compressed list of URLs.
You can control how far the multicast packets propagate by setting the badly misnamed "TTL".
Using the multicast IP protocol, the TTL value indicates the scope or range in which a packet may be forwarded.
By convention:
- 0 is restricted to the same host
- 1 is restricted to the same subnet
- 32 is restricted to the same site
- 64 is restricted to the same region
- 128 is restricted to the same continent
- 255 is unrestricted
You can also control how often the heartbeat sends by setting the interval.
author: Greg Luck version: $Id: MulticastKeepaliveHeartbeatSender.java 537 2007-08-14 23:52:19Z gregluck $ |
MulticastKeepaliveHeartbeatSender | public MulticastKeepaliveHeartbeatSender(CacheManager cacheManager, InetAddress multicastAddress, Integer multicastPort, Integer timeToLive)(Code) | | Constructor.
Parameters: cacheManager - the bound CacheManager. Each CacheManager has a maximum of one sender Parameters: multicastAddress - Parameters: multicastPort - Parameters: timeToLive - See class description for the meaning of this parameter. |
dispose | final public synchronized void dispose()(Code) | | Shutdown this heartbeat sender
|
getHeartBeatInterval | public static long getHeartBeatInterval()(Code) | | Returns the heartbeat interval.
|
init | final public void init()(Code) | | Start the heartbeat thread
|
setHeartBeatInterval | public static void setHeartBeatInterval(long heartBeatInterval)(Code) | | Sets the heartbeat interval to something other than the default of 5000ms. This is useful for testing,
but not recommended for production. This method is static and so affects the heartbeat interval of all
senders. The change takes effect after the next scheduled heartbeat.
Parameters: heartBeatInterval - a time in ms, greater than 1000 |
|
|