|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectNode
DVNode
public class DVNode
Distance Vector algorithm implementing node. If you want to tune the DV algorithm, this is the place.
Field Summary |
---|
Fields inherited from class Node |
---|
failed, lastHeardDelay, lastUpdatedSlot, neighbor, rand, uid |
Constructor Summary | |
---|---|
DVNode()
|
Method Summary | |
---|---|
protected void |
failureEvent()
This method is invoked (by Node.java) when a previously running node goes down. |
protected void |
neighborFailureEvent(Node neighbor)
Invoked when a timeout indicates that a neighbor node has failed. |
protected void |
processUpdate(UpdatePacket udp)
Called for each update packet in this node's queue when it is selected to run during a time step. |
protected void |
recoveryEvent()
This method is invoked (by Node.java) when a previously failed node comes back online. |
protected void |
startUpdate()
When this node is selected to run during a time step, the "driver" code in Node.java: first calls this routine (startUpdate()) then with high, but not certain, probability calls processUpdate() for each update packet in the node's queue |
protected void |
stopUpdate()
See comment before startUpdate(). |
Methods inherited from class Node |
---|
getRoutingTable, getUID, hasFailed, oracleComputeRoutingTable, oracleFillTable, sendUpdatePacket, setHasFailed, setupNeighborInformation, swapInQueues, takeStep, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public DVNode()
Method Detail |
---|
protected void startUpdate()
startUpdate
in class Node
protected void processUpdate(UpdatePacket udp)
processUpdate
in class Node
protected void stopUpdate()
stopUpdate
in class Node
protected void failureEvent()
You are honor bound to throw away any information your node may have cached when this happens. (Node.java will have already thrown out what it knows about, i.e., the routing table.)
failureEvent
in class Node
protected void recoveryEvent()
Because the base implementation depends on the logging done by the RouterTable object, we must force all "no path to the destination" entries into it. We do that here. (Note that RouterTable.startLogging() has already been called (by startUpdate()) when control reaches this point.)
Node.java sets the routing table entry for this node to itself correctly when you return from this method.
recoveryEvent
in class Node
protected void neighborFailureEvent(Node neighbor)
neighborFailureEvent
in class Node
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |