All Packages This Package Class Hierarchy Class Search Index
java.lang.Object | +----edu.utah.janos.route.RouteTable | +----edu.utah.janos.route.WriteableRouteTable | +----edu.utah.janos.antsr.route.DynamicRouteTable
Summary |
public class DynamicRouteTable extends edu.utah.janos.route.WriteableRouteTable implements edu.utah.janos.antsr.core.RouteTable { // Fields 3 public static final int INFINITY; private final Hashtable gateways; private final Hashtable gcPool; // Constructors 1 public DynamicRouteTable(); // Methods 11 public void addRoute(RouteEntry); public void addRoute(int, int, String) throws NoSuchNodeAddress, AddressFormatException; public void configure(int, boolean, String) throws IOException, AddressFormatException, NoSuchNodeAddress; Hashtable gcPool(); public Enumeration getGateways(); public Enumeration getNeighbors(); public RouteEntry getRoute(int); public RouteEntry getRoute(Integer); public boolean isGateway(int); public int neighborCount(); public void removeRoute(RouteEntry); }
The ANTSR DynamicRouteTable contains all of the state and code for maintaining a dynamic routing table. This includes sending out periodic updates, sending out immediate updates, (and receiving both). GC'ing stale routes, etc.
I think there are some problems in here for a node that has more than one physical address. It will probably send the wrong info out to the other nodes...
Based very strongly on the dynamic route table from the original MIT ANTS. I renamed and moved a lot of things around, but I (hopefully) didn't change the update algorithm.
XXX access control issues.
Fields |
· INFINITY | Summary | Top |
public static final int INFINITY
Maximum cost of travelling to a node. Dunno why 16 is a good number.
· gcPool | Summary | Top |
private final Hashtable gcPool
GC pool; unavailable for retrieving routes from.
DynamicRouteEntries are added to the GC pool when they "expire". Later, they will be deleted from the GC pool, for good. DynamicRouteEntries might get "resuscitated" from the pool.
Maps Integer() wrapped destintion addresses to RouteEntries. XXX this is actually another RouteTable instance...
· gateways | Summary | Top |
private final Hashtable gateways
Gateways: hardwired connections to other networks. This map contains *only* immediate neighbors, but can be changed if new neighbors are found or if neighbors expire.
Maps Integer() wrapped destintion addresses to DynamicRouteEntries. XXX this is actually another RouteTable instance...
Only really used in the sendRouteMessages() function.
See Also: sendRouteMessages
Constructors |
· DynamicRouteTable | Summary | Top |
public DynamicRouteTable()
Methods |
· configure | Summary | Top |
public void configure(int nodeAddr, boolean doUpdates, String configFile) throws IOException, AddressFormatException, NoSuchNodeAddress
XXX one-time function.
- Implements:
- configure in interface RouteTable
· getRoute | Summary | Top |
public RouteEntry getRoute(int activeDest)
Retrive the current route to get to the given active address.
- Overrides:
- getRoute in class WriteableRouteTable
- Implements:
- getRoute in interface RouteTable
· getRoute | Summary | Top |
public RouteEntry getRoute(Integer activeDest)
- Overrides:
- getRoute in class WriteableRouteTable
· gcPool | Summary | Top |
Hashtable gcPool()
· getNeighbors | Summary | Top |
public Enumeration getNeighbors()
- Overrides:
- getNeighbors in class RouteTable
- Implements:
- getNeighbors in interface RouteTable
· getGateways | Summary | Top |
public Enumeration getGateways()
· isGateway | Summary | Top |
public boolean isGateway(int addr)
· neighborCount | Summary | Top |
public int neighborCount()
- Overrides:
- neighborCount in class RouteTable
- Implements:
- neighborCount in interface RouteTable
· addRoute | Summary | Top |
public void addRoute(int activeDest, int activeNext, String physNext) throws NoSuchNodeAddress, AddressFormatException
Add a route to the table.
XXX this is only invoked by RouteTableReader. Don't call internally...
- Overrides:
- addRoute in class WriteableRouteTable
· addRoute | Summary | Top |
public void addRoute(RouteEntry re)
Add a route to the table. If it is a neighbor, add it to the gateways
- Overrides:
- addRoute in class WriteableRouteTable
· removeRoute | Summary | Top |
public void removeRoute(RouteEntry re)
Remove a route from the table. If it is a neighbor, then drop it from the gateways table
- Overrides:
- removeRoute in class WriteableRouteTable
All Packages This Package Class Hierarchy Class Search IndexFreshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7