|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.mgmt.HealthMonitor
public class HealthMonitor
HealthMonitor utilizes MasterNode to determine self designation. All nodes cache other node's states, and can act as a master node at any given point in time. The intention behind the designation is that no node other than the master node should determine collective state and communicate it to group members.
TODO: Convert the InDoubt Peer Determination and Failure Verification into Callable FutureTask using java.util.concurrent
| Nested Class Summary | |
|---|---|
static class |
HealthMonitor.PeerMachineConnectionResult
This method is for designating myself in network isolation if my network interface is not up. |
| Field Summary | |
|---|---|
static short |
CLUSTERSTOPPING
|
static short |
DEAD
|
static long |
DEFAULT_MEMBERSTATE_TIMEOUT
|
static String |
HEALTHM
|
boolean |
outstandingFailureToVerify
|
static short |
PEERSTOPPING
|
static short |
STOPPED
|
| Constructor Summary | |
|---|---|
HealthMonitor(ClusterManager manager,
long timeout,
int maxMissedBeats,
long verifyTimeout,
long failureDetectionTCPTimeout,
int failureDetectionTCPPort)
Constructor for the HealthMonitor object |
|
| Method Summary | |
|---|---|
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()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
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
| Constructor Detail |
|---|
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.| Method Detail |
|---|
public long getIndoubtDuration()
public void receiveMessageEvent(MessageEvent event)
throws MessageIOException
MessageEvent
receiveMessageEvent in interface MessageListenerevent - a received message event
MessageIOException - 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()
run in interface Runnable
public String getMemberState(PeerID peerID,
long threshold,
long timeout)
peerID - threshold - 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 String getMemberStateViaLWR(PeerID peerID,
long timeout)
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)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||