public class HeartBeatControl
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected de.aristaflow.adept2.core.registry.cluster.CommHeartBeat |
commHeartBeat
The daemon thread that polls the cluster server via communication.
|
protected java.util.concurrent.locks.Lock |
controlLock
The lock required to control the cluster node.
|
protected de.aristaflow.adept2.core.registry.cluster.ClusterHeartBeat |
heartBeat
The daemon thread that sends the alive signal of this cluster node and regularly polls for the
server.
|
protected java.util.logging.Logger |
logger
The logger of the cluster node
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
spawnCommHeartBeat(ClusterCommPoller poller,
java.lang.String clusterNodeName,
java.lang.String logName,
long period)
Creates a new thread for polling the cluster server via communication.
|
protected void |
spawnHeartBeat(ClusterDbPoller poller,
java.lang.String clusterNodeName,
java.lang.String logName,
long period)
Creates a new thread for sending an alive signal to the cluster as well as polling the cluster
server via database.
|
protected void |
terminateCommHeartBeat()
Terminates the heartbeat using communication in case one exists.
|
protected void |
terminateHeartBeat()
Terminates the heartbeat polling the database in case one exists.
|
protected void |
triggerCommPoll()
Triggers the communication heartbeat to poll in case one exists.
|
protected void |
triggerPoll(ClusterInteractionRequest cir)
Triggers the DB heartbeat to poll using the designated request in case one exists.
|
protected final java.util.logging.Logger logger
protected final java.util.concurrent.locks.Lock controlLock
protected volatile de.aristaflow.adept2.core.registry.cluster.ClusterHeartBeat heartBeat
protected volatile de.aristaflow.adept2.core.registry.cluster.CommHeartBeat commHeartBeat
protected void spawnHeartBeat(ClusterDbPoller poller, java.lang.String clusterNodeName, java.lang.String logName, long period)
poller - The interface polling a cluster node via DB.clusterNodeName - The name of the cluster node including the cluster name.logName - The name of the cluster node including some state information to use in logs.period - The time in milliseconds, being alive is signalled/the server node is polled.protected void spawnCommHeartBeat(ClusterCommPoller poller, java.lang.String clusterNodeName, java.lang.String logName, long period)
poller - The interface polling a cluster node via communication.clusterNodeName - The name of the cluster node including the cluster name.logName - The name of the cluster node including some state information to use in logs.period - The time in milliseconds, being alive is signalled/the server node is polled.protected void triggerPoll(ClusterInteractionRequest cir)
cir - The request used for polling the DB.protected void triggerCommPoll()
protected void terminateHeartBeat()
protected void terminateCommHeartBeat()
shutting down the
injected service. Afterwards the registry will not provide the cluster service of the server any more
and the heartbeat cannot poll.