|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--apps.health.NodeHealth
A NodeHealth object is used to store the health state of a node in the network. The implementation of this class only maintains coarse grained state, however, it should be simple enough to extend if more detail needs to be transmitted.
| Field Summary | |
protected int |
state
The health state of the node. |
static int |
STATE_ASSUMED_OK
The node is assumed to be ok, there hasn't been a recent report, but its not long enough to start worrying. |
static int |
STATE_FINE
The node is fine, all sensors are within limits. |
static int |
STATE_MAX
The maximum state value. |
static int |
STATE_MIN
The minimum state value. |
static java.lang.String[] |
STATE_NAMES
The human readable names of the state values. |
static int |
STATE_OFF
The node is turned off, don't expect any reports. |
static int |
STATE_ON_FIRE
The node is not alright, one or more sensors are outside acceptable limits. |
static int |
STATE_UNKNOWN
The node state cannot be polled. |
static int |
STATE_UNREACHABLE
The node is unreachable through the network. |
| Constructor Summary | |
NodeHealth(java.lang.String name)
Construct a NodeHealth object with the given values. |
|
| Method Summary | |
IntegerPermission |
collected(Node node,
ProtocolSession ps)
This is called when this element is up for collection, the return value specifies the new expiration time. |
java.lang.String |
getName()
|
int |
getState()
|
void |
getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
void |
handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
|
void |
marshal(XdrByteArray xba)
|
int |
marshalledLength()
|
IntegerPermission |
poll(HealthSession hs)
Poll the node's health and update this object's state. |
void |
removed(Node node,
ProtocolSession ps)
This is called when the element is manually removed from from the cache. |
edu.utah.janosvm.kit.comm.jsi.JSIHandler |
resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
|
void |
setState(int state)
|
java.lang.String |
toString()
|
void |
unmarshal(XdrByteArray xba)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int STATE_MIN
public static final int STATE_FINE
public static final int STATE_ON_FIRE
public static final int STATE_ASSUMED_OK
public static final int STATE_UNKNOWN
public static final int STATE_UNREACHABLE
public static final int STATE_OFF
public static final int STATE_MAX
public static final java.lang.String[] STATE_NAMES
protected int state
| Constructor Detail |
public NodeHealth(java.lang.String name)
name - The name of the node this health information pertains to.| Method Detail |
public java.lang.String getName()
public void setState(int state)
state - The health state of the node.public int getState()
public int marshalledLength()
public void marshal(XdrByteArray xba)
public void unmarshal(XdrByteArray xba)
public IntegerPermission poll(HealthSession hs)
hs - The HealthSession for the current flow.
public void removed(Node node,
ProtocolSession ps)
NodeCache.EventHandlerremoved in interface NodeCache.EventHandlerNodeCache.EventHandler.removed(Node, ProtocolSession)
public IntegerPermission collected(Node node,
ProtocolSession ps)
NodeCache.EventHandlercollected in interface NodeCache.EventHandlerNodeCache.EventHandler.collected(Node, ProtocolSession)
public edu.utah.janosvm.kit.comm.jsi.JSIHandler resolveSpecifier(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm,
edu.utah.janosvm.kit.comm.jsi.JSIPair jp)
resolveSpecifier in interface edu.utah.janosvm.kit.comm.jsi.JSIHandlerJSIHandler.resolveSpecifier(JSIMessage, JSIPair)
public void handleMessage(edu.utah.janosvm.kit.comm.jsi.JSIHandlerContext jhc,
edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
handleMessage in interface edu.utah.janosvm.kit.comm.jsi.JSIHandlerJSIHandler.handleMessage(JSIHandlerContext, JSIMessage)public void getSuites(edu.utah.janosvm.kit.comm.jsi.JSIMessage jm)
getSuites in interface edu.utah.janosvm.kit.comm.jsi.JSIHandlerJSIHandler.getSuites(JSIMessage)public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
Bees v0.5.0 API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||