@StampyLibrary(libraryName="stampy-client-server") public class HeartbeatContainer extends java.lang.Object implements StampyHeartbeatContainer
PaceMakers. This class is a
singleton; wire into the system appropriately.HB1, HB2| Constructor and Description |
|---|
HeartbeatContainer() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
add(HostPort hostPort,
asia.stampy.common.heartbeat.PaceMaker paceMaker)
Adds a new
PaceMaker for the specified HostPort. |
void |
remove(HostPort hostPort)
Removes the
PaceMaker specified by HostPort. |
void |
reset(HostPort hostPort)
Resets the
PaceMaker for the specified HostPort, preventing
a heartbeat from being sent. |
void |
start(HostPort hostPort,
AbstractStampyMessageGateway gateway,
int timeMillis)
Starts a heartbeat for the specified host & port.
|
void |
stop(HostPort hostPort)
Stops heartbeats to the specified
HostPort. |
public void start(HostPort hostPort, AbstractStampyMessageGateway gateway, int timeMillis)
StampyHeartbeatContainerstart in interface StampyHeartbeatContainerpublic void stop(HostPort hostPort)
StampyHeartbeatContainerHostPort.stop in interface StampyHeartbeatContainerhostPort - the host portprotected void add(HostPort hostPort, asia.stampy.common.heartbeat.PaceMaker paceMaker)
PaceMaker for the specified HostPort.hostPort - the host portpaceMaker - the pace makerpublic void remove(HostPort hostPort)
StampyHeartbeatContainerPaceMaker specified by HostPort.remove in interface StampyHeartbeatContainerhostPort - the host portpublic void reset(HostPort hostPort)
StampyHeartbeatContainerPaceMaker for the specified HostPort, preventing
a heartbeat from being sent.reset in interface StampyHeartbeatContainerhostPort - the host port