|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--tapestry.patchwork.Patch | +--tapestry.patchwork.RecalcPatch
A Patch that recalculate the PatchworkTable
and sends out
deltas.
Also, it currently is hardcoded to send out messages when it notices that
a node is down (loss rate > 95%).
Nested Class Summary |
---|
Nested classes inherited from class tapestry.patchwork.Patch |
---|
Patch.SeqNo |
Field Summary |
---|
Fields inherited from class tapestry.patchwork.Patch |
---|
_classifier, _fault_admin, _period, _probe_times, _queue, _quick_stats, _self_node_id, _seq_nos, _table, _type, _udp_lock, _udp_socket, _userdata_sinks, _write_selitem, _write_selset, class_tag, DEBUG, NUM_TYPES, sim_running, TYPE_BANDWIDTH, TYPE_LATENCY, TYPE_LOSS, TYPE_RECALC, use_tcp |
Constructor Summary | |
---|---|
RecalcPatch(NodeId self_node_id,
Classifier classifier,
PatchworkTable table,
FaultAdmin fault_admin,
Period period)
|
Method Summary | |
---|---|
void |
addMonitorAll(Object userData,
SinkIF sink)
Tells this patch that a node wants to hear about status messages from everyone. |
void |
addNode(NodeId node,
int level,
Object userData,
SinkIF sink)
Tell this Patch to begin monitoring a node at some probing level |
protected void |
addToQueue(NodeId node)
Add this node back on the queue. |
protected int |
getAndUpdateSeqNo(NodeId node)
Get the next sequence number for this node, and update it for next time. |
protected void |
handleAlarm(AlarmMsg alarm)
|
protected void |
handleNetworkNodeStatusMsg(NetworkNodeStatusMsg msg)
|
protected void |
handleProbe(ProbeMsg inProbe)
|
protected void |
handleProbeResponse(ProbeMsg response,
long timeRecvd)
Handle the response to a probe. |
protected void |
handleTimeout(ProbeTimeout timeout)
|
protected void |
makeObservation(NodeId peer,
long value,
byte type)
Record an observation (of arbitrary type) in the table |
protected long |
registerResponse(ProbeMsg response)
We received a response, so figure out state |
protected boolean |
registerTimeout(ProbeTimeout pt)
Got a timeout for a probe. |
void |
removeNode(NodeId node,
Object userData,
SinkIF sink)
Tell this Patch to stop monitoring a node |
protected void |
sendProbe(ProbeMsg probe)
Send a probe to another node, expecting a response back. |
protected void |
setNextAlarm()
Pick the node from the queue that needs to be probed the soonest, and set the alarm for it. |
Methods inherited from class tapestry.patchwork.Patch |
---|
dispatch, dispatch, enqueue, handleEvent, handleQuickStatProbeResp, handleQuickStatReq, handleQuickStatTimeout, handleUnknown, makeObservation, sendQuickStatProbe |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RecalcPatch(NodeId self_node_id, Classifier classifier, PatchworkTable table, FaultAdmin fault_admin, Period period)
Method Detail |
public void addNode(NodeId node, int level, Object userData, SinkIF sink)
Patch
addNode
in class Patch
node
- the node to begin monitoringlevel
- the probing level for that nodeuserData
- an object that will identify this monitoring instance
to the calling applicationsink
- the sink on which to enqueue status responsespublic void addMonitorAll(Object userData, SinkIF sink)
Patch
addMonitorAll
in class Patch
userData
- an object that will identify this monitoring instance
to the calling applicationsink
- the sink on which to enqueue status responsespublic void removeNode(NodeId node, Object userData, SinkIF sink)
Patch
removeNode
in class Patch
node
- the node to stop monitoringuserData
- an object that will identify this monitoring instance
to the calling applicationsink
- the sink on which to enqueue status responsesprotected void addToQueue(NodeId node)
Patch
addToQueue
in class Patch
node
- the node to addprotected void setNextAlarm()
Patch
setNextAlarm
in class Patch
protected void makeObservation(NodeId peer, long value, byte type)
Patch
makeObservation
in class Patch
peer
- the node being observedvalue
- the value of the observed measurementtype
- the type of the observationprotected void handleProbeResponse(ProbeMsg response, long timeRecvd)
Patch
handleProbeResponse
in class Patch
response
- the responsetimeRecvd
- the absolute time the repsonse was received
(in microseconds)protected void handleAlarm(AlarmMsg alarm)
handleAlarm
in class Patch
protected void handleTimeout(ProbeTimeout timeout)
handleTimeout
in class Patch
protected void handleProbe(ProbeMsg inProbe)
handleProbe
in class Patch
protected void sendProbe(ProbeMsg probe)
Patch
sendProbe
in class Patch
protected long registerResponse(ProbeMsg response)
Patch
registerResponse
in class Patch
protected boolean registerTimeout(ProbeTimeout pt)
Patch
registerTimeout
in class Patch
protected int getAndUpdateSeqNo(NodeId node)
Patch
getAndUpdateSeqNo
in class Patch
protected void handleNetworkNodeStatusMsg(NetworkNodeStatusMsg msg)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |