public class HealthMonitor extends Object implements MessageListener, Runnable
TODO: Convert the InDoubt Peer Determination and Failure Verification into Callable FutureTask using java.util.concurrent
| Modifier and Type | Class and Description |
|---|---|
static class |
HealthMonitor.PeerMachineConnectionResult
This method is for designating myself in network isolation
if my network interface is not up.
|
| Modifier and Type | Field and Description |
|---|---|
static short |
CLUSTERSTOPPING |
static short |
DEAD |
static long |
DEFAULT_MEMBERSTATE_TIMEOUT |
static String |
HEALTHM |
boolean |
outstandingFailureToVerify |
static short |
PEERSTOPPING |
static short |
STOPPED |
| Constructor and Description |
|---|
HealthMonitor(ClusterManager manager,
long timeout,
int maxMissedBeats,
long verifyTimeout,
long failureDetectionTCPTimeout,
int failureDetectionTCPPort)
Constructor for the HealthMonitor object
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addHealthEntryIfMissing(SystemAdvertisement adv) |
void |
announceWatchdogObservedFailure(String failedMemberToken) |
long |
getIndoubtDuration()
A member is considered INDOUBT when a heartbeat has not been received in this amout of time.
|
String |
getMemberState(PeerID peerID,
long threshold,
long timeout) |
String |
getMemberStateFromHeartBeat(PeerID peerID,
long threshold) |
String |
getMemberStateViaLWR(PeerID peerID,
long timeout) |
com.sun.enterprise.mgmt.HealthMonitor.MsgSendStats |
getMsgSendStats(String memberName) |
int |
getType()
Returns the message type which
Message is supporting
i.g. |
boolean |
isConnected(HealthMessage.Entry entry) |
void |
receiveMessageEvent(MessageEvent event)
Processing a
MessageEvent |
void |
reportJoinedAndReadyState() |
void |
run()
Main processing method for the HealthMonitor object
|
void |
setJoinedAndReadyReceived() |
public static final short CLUSTERSTOPPING
public static final short PEERSTOPPING
public static final short STOPPED
public static final short DEAD
public static final String HEALTHM
public volatile boolean outstandingFailureToVerify
public static final long DEFAULT_MEMBERSTATE_TIMEOUT
public HealthMonitor(ClusterManager manager, long timeout, int maxMissedBeats, long verifyTimeout, long failureDetectionTCPTimeout, int failureDetectionTCPPort)
manager - the ClusterManagermaxMissedBeats - Maximum retries before failureverifyTimeout - timeout in milliseconds that the health monitor
waits before finalizing that the in doubt peer is dead.timeout - in milliseconds that the health monitor waits before
retrying an indoubt peer's availability.failureDetectionTCPPort - the tcp port of failure DetectionfailureDetectionTCPTimeout - the timeout to detect the failurepublic long getIndoubtDuration()
public void receiveMessageEvent(MessageEvent event) throws MessageIOException
MessageEventreceiveMessageEvent in interface MessageListenerevent - a received message eventMessageIOException - if I/O error occurspublic int getType()
MessageListenerMessage is supporting
i.g. Message.TYPE_CLUSTER_MANAGER_MESSAGE or Message.TYPE_HEALTH_MONITOR_MESSAGE's integer value or etc...getType in interface MessageListenerpublic void run()
public String getMemberState(PeerID peerID, long threshold, long timeout)
peerID - is the peer idthreshold - is a positive value if the user wants to look at the caller's local
cache to get the statetimeout - is a positive value if the user desires to make a network call directly to the
member whose state it wants
if both the above parameters are specified, then fisrt attempt is to get the state from the local
cache. If it comes back as UNKNOWN, then another attempt is made via LWR multicast to get the state
directly from the concerned member.public String getMemberStateFromHeartBeat(PeerID peerID, long threshold)
public boolean addHealthEntryIfMissing(SystemAdvertisement adv)
public void reportJoinedAndReadyState()
public boolean isConnected(HealthMessage.Entry entry)
public void announceWatchdogObservedFailure(String failedMemberToken)
public void setJoinedAndReadyReceived()
public com.sun.enterprise.mgmt.HealthMonitor.MsgSendStats getMsgSendStats(String memberName)
Copyright © 2017–2019 Eclipse Foundation. All rights reserved.