ehcache

net.sf.ehcache.distribution
Class MulticastKeepaliveHeartbeatSender

java.lang.Object
  extended by net.sf.ehcache.distribution.MulticastKeepaliveHeartbeatSender

public final class MulticastKeepaliveHeartbeatSender
extends java.lang.Object

Sends heartbeats to a multicast group containing a compressed list of URLs. Supports up to approximately 500 configured caches.

Version:
$Id: MulticastKeepaliveHeartbeatSender.java 191 2006-09-03 22:41:48Z gregluck $
Author:
Greg Luck

Constructor Summary
MulticastKeepaliveHeartbeatSender(CacheManager cacheManager, java.net.InetAddress multicastAddress, java.lang.Integer multicastPort)
          Constructor
 
Method Summary
 void dispose()
          Shutdown this heartbeat sender
static long getHeartBeatInterval()
          Returns the heartbeat interval.
 void init()
          Start the heartbeat thread
(package private) static void setHeartBeatInterval(long heartBeatInterval)
          Sets the heartbeat interval to something other than the default of 5000ms.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MulticastKeepaliveHeartbeatSender

public MulticastKeepaliveHeartbeatSender(CacheManager cacheManager,
                                         java.net.InetAddress multicastAddress,
                                         java.lang.Integer multicastPort)
Constructor

Parameters:
multicastAddress -
multicastPort -
Method Detail

init

public final void init()
Start the heartbeat thread


dispose

public final void dispose()
Shutdown this heartbeat sender


setHeartBeatInterval

static void setHeartBeatInterval(long heartBeatInterval)
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

getHeartBeatInterval

public static long getHeartBeatInterval()
Returns the heartbeat interval.


ehcache