|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectSim.Routing.Champ.RouteCache
public class RouteCache
Constructor Summary | |
---|---|
RouteCache()
Creates a new instance of RouteCache |
Method Summary | |
---|---|
void |
addDestination(int numPaths,
int dest,
int distance,
int successor)
addDestination will add a destination to the routeCache |
void |
addSuccessor(int destination,
int successor,
int finalDistance)
addSuccessor |
java.util.LinkedList<Destination> |
getDestinations()
|
NextHop |
getNextHop(int destination)
|
boolean |
isSuccessor(int node,
int destination)
isSuccessor will return true is the node passed to it is successor to destination |
int |
removeSuccessor(int address)
|
void |
setDestinations(java.util.LinkedList<Destination> destinations)
|
void |
setDestNextHop(int destination,
int hop,
int distanceToDest)
setDestNextHop will set the next hop for this destination in the the route Cache |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RouteCache()
Method Detail |
---|
public NextHop getNextHop(int destination)
public boolean isSuccessor(int node, int destination)
public void addDestination(int numPaths, int dest, int distance, int successor)
numPaths
- max allowed pathsdest
- final destinationdistance
- total distancepublic void addSuccessor(int destination, int successor, int finalDistance)
destination
- successor
- next hopfinalDistance
- public int removeSuccessor(int address)
public java.util.LinkedList<Destination> getDestinations()
public void setDestinations(java.util.LinkedList<Destination> destinations)
public void setDestNextHop(int destination, int hop, int distanceToDest)
destination
- hop
- address of next hopdistance
- to final destination
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |