tapestry.patchwork
Class LossPatch
java.lang.Object
|
+--tapestry.patchwork.Patch
|
+--tapestry.patchwork.LossPatch
- public class LossPatch
- extends Patch
A Patch
that measures loss rate in percent, from 0 to 100,
where 100 percent means all packets are lost.
- Version:
- $Id: LossPatch.java,v 1.1.1.1 2004/03/26 19:57:09 hweather Exp $
- Author:
- Jeremy Stribling
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 |
Methods inherited from class tapestry.patchwork.Patch |
addMonitorAll, addNode, addToQueue, dispatch, dispatch, enqueue, handleEvent, handleQuickStatProbeResp, handleQuickStatReq, handleQuickStatTimeout, handleUnknown, makeObservation, makeObservation, registerResponse, registerTimeout, removeNode, sendProbe, setNextAlarm |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VALUE_NON_LOSS
public static final long VALUE_NON_LOSS
- See Also:
- Constant Field Values
VALUE_LOSS
public static final long VALUE_LOSS
- See Also:
- Constant Field Values
LossPatch
public LossPatch(NodeId self_node_id,
Classifier classifier,
PatchworkTable table,
FaultAdmin fault_admin,
Period period,
int lossRespondEvery)
handleProbeResponse
protected void handleProbeResponse(ProbeMsg response,
long timeRecvd)
- Description copied from class:
Patch
- Handle the response to a probe.
- Specified by:
handleProbeResponse
in class Patch
- Parameters:
response
- the responsetimeRecvd
- the absolute time the repsonse was received
(in microseconds)
handleProbe
protected void handleProbe(ProbeMsg inProbe)
- Overrides:
handleProbe
in class Patch
handleAlarm
protected void handleAlarm(AlarmMsg alarm)
- Specified by:
handleAlarm
in class Patch
sendQuickStatProbe
protected void sendQuickStatProbe(NodeId peer)
- Description copied from class:
Patch
- Send a standard quick probe to the given node.
- Overrides:
sendQuickStatProbe
in class Patch
handleTimeout
protected void handleTimeout(ProbeTimeout timeout)
- Specified by:
handleTimeout
in class Patch
getAndUpdateSeqNo
protected int getAndUpdateSeqNo(NodeId node)
- Description copied from class:
Patch
- Get the next sequence number for this node, and update it for next time.
- Overrides:
getAndUpdateSeqNo
in class Patch
- Returns:
- the sequence number to use for the next probe.