public final class MulticastKeepaliveHeartbeatSender extends Object
Constructor and Description |
---|
MulticastKeepaliveHeartbeatSender(CacheManager cacheManager,
InetAddress multicastAddress,
Integer multicastPort,
Integer timeToLive,
InetAddress hostAddress)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Shutdown this heartbeat sender
|
static long |
getHeartBeatInterval()
Returns the heartbeat interval.
|
static long |
getHeartBeatStaleTime()
Returns the time after which a heartbeat is considered stale.
|
Integer |
getTimeToLive() |
void |
init()
Start the heartbeat thread
|
static void |
setHeartBeatInterval(long heartBeatInterval)
Sets the heartbeat interval to something other than the default of 5000ms.
|
static void |
setHeartBeatStaleTime(long heartBeatStaleTime)
Sets the heartbeat stale time to something other than the default of
((2 * HeartBeatInterval) + 100)ms . |
public MulticastKeepaliveHeartbeatSender(CacheManager cacheManager, InetAddress multicastAddress, Integer multicastPort, Integer timeToLive, InetAddress hostAddress)
cacheManager
- the bound CacheManager. Each CacheManager has a maximum of one sendermulticastAddress
- multicastPort
- timeToLive
- See class description for the meaning of this parameter.public final void init()
public final void dispose()
public static void setHeartBeatInterval(long heartBeatInterval)
heartBeatInterval
- a time in ms, greater than 1000public static void setHeartBeatStaleTime(long heartBeatStaleTime)
((2 * HeartBeatInterval) + 100)ms
.
This is useful for testing, but not recommended for production. This method is static and so affects the stale
time all users.heartBeatStaleTime
- a time in mspublic static long getHeartBeatInterval()
public static long getHeartBeatStaleTime()
public Integer getTimeToLive()
Copyright © 2003–2016 Terracotta, Inc.. All rights reserved.