|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjade.core.NodeFailureMonitor
public abstract class NodeFailureMonitor
The abstract class NodeFailureMonitor provides a basic implementation for classes
that are used to monitor the availability of nodes and detect node failures. In addition to that it provides
static methods to initialize and create instances of monitors depending on the current
settings in the profile.
An instance of a subclass of the NodeFailureMonitor can only supervise
a single node. If there are additional nodes in the same JVM, you can add these as child nodes.
A child node is not supervised directly. Instead it has always the same state than its parent node.
So if the parent node gets unreachable automatically all its child nodes will turn to the state unreachable.
Since JADE 3.3 there are two different types of failure monitoring available:
The failure monitoring can be configured through the following profile parameter:
| Parameter | Description | PC | MC |
|---|---|---|---|
jade_core_NodeFailureMonitor_udp (*) |
If true, indicates that the UDP based failure monitoring has to be used.
If false or not specified the default RMI based failure monitoring is activated.
|
X | X |
jade_core_NodeFailureMonitor_udp-port |
Specifies the port number where the main container will listen for UDP pings.
The default value is 28000. (This parameter is only used in combination with (*) |
X | X |
jade_core_NodeFailureMonitor_udp-ping-delay-limit |
Defines the maximum time (in milliseconds) the main container will wait for
incoming ping messages. The default value is 3000. (This parameter is only used in combination with (*) |
X | |
jade_core_NodeFailureMonitor_udp-unreachable-limit |
Defines the maximum time (in milliseconds) a node can be temporarily unreachable
until it gets removed from the platform. The default value is 10.000. (This parameter is only used in combination with (*) |
X | |
jade_core_NodeFailureMonitor_udp-ping-delay |
Defines the time interval (in milliseconds) in which a peripheral
container sends UDP ping messages to the main container.
The default value is 1.000. (This parameter is only used in combination with (*) |
X |
MC ... main container PC ... peripheral container
NodeEventListener| Field Summary | |
|---|---|
protected Map |
childNodes
|
protected NodeEventListener |
listener
|
protected Node |
target
|
| Constructor Summary | |
|---|---|
NodeFailureMonitor()
|
|
| Method Summary | |
|---|---|
void |
addChild(Node n)
Add a child node for monitoring. |
protected void |
fireNodeAdded()
Fire a NODE ADDED event |
protected void |
fireNodeReachable()
Fire a NODE REACHABLE event |
protected void |
fireNodeRemoved()
Fire a NODE REMOVED event |
protected void |
fireNodeUnreachable()
Fire a NODE UNREACHABLE event |
static NodeFailureMonitor |
getFailureMonitor()
Factory method to create NodeFailureMonitor objects |
Node |
getNode()
Return the monitored target node |
static void |
init(jade.core.nodeMonitoring.NodeMonitoringService nms)
|
void |
removeChild(Node n)
Remove a child node from monitoring |
void |
start(Node n,
NodeEventListener nel)
Start the monitoring |
abstract void |
stop()
Stop the monitoring |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Node target
protected NodeEventListener listener
protected Map childNodes
| Constructor Detail |
|---|
public NodeFailureMonitor()
| Method Detail |
|---|
public void start(Node n,
NodeEventListener nel)
n - target node to monitornel - listener to inform about new eventspublic abstract void stop()
public void addChild(Node n)
n - child nodepublic void removeChild(Node n)
n - child nodepublic Node getNode()
protected void fireNodeAdded()
protected void fireNodeRemoved()
protected void fireNodeReachable()
protected void fireNodeUnreachable()
public static NodeFailureMonitor getFailureMonitor()
NodeFailureMonitor.public static void init(jade.core.nodeMonitoring.NodeMonitoringService nms)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||