JNodeOS v1.1.5 API

edu.utah.janos.route
Class RouteTable

java.lang.Object
  |
  +--edu.utah.janosvm.sys.ListNode
        |
        +--edu.utah.janosvm.sys.Importable
              |
              +--edu.utah.janos.route.RouteTable
Direct Known Subclasses:
WriteableRouteTable

public class RouteTable
extends edu.utah.janosvm.sys.Importable

Routing table. Maps 32-bit integer "active addresses" to RouteEntries. A RouteEntry contains the core Address object which, in turn, contains the "real" address of the target node. RouteEntry can be subclassed to add more information to the table.

XXX most the hashtable used in this class is indexed by 'ints'. But, that requires allocating (and dropping) a lot of "Integer" objects. Could be optimized by moving to a more pure hashtable (or putting the Integer in the RouteTable. Also, would benefit from parameterized tables.

By design, this class defines a read-only RouteTable for users in other packages. Access to WriteableRouteTable is required to make updates to the RouteTable.

Note that the read-only-ness of this class depends on the immutablity of base RouteEntries.

Author:
Janos Ministry of Development
See Also:
WriteableRouteTable

Fields inherited from class edu.utah.janosvm.sys.ListNode
pred, succ
 
Constructor Summary
RouteTable()
          Construct a table for routes.
 
Method Summary
 java.util.Enumeration getNeighbors()
           
 RouteEntry getRoute(int activeDest)
          Retrive the current route to get to the given active address.
 RouteEntry getRoute(java.lang.Integer activeDest)
           
 java.util.Enumeration getRoutes()
           
 int neighborCount()
           
 int routeCount()
           
 
Methods inherited from class edu.utah.janosvm.sys.Importable
clone, equals, pointsTo
 
Methods inherited from class edu.utah.janosvm.sys.ListNode
append, prepend, remove
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RouteTable

public RouteTable()
Construct a table for routes. The initial table is empty. Routes can be added through addRoute() or ...

XXX take a size hint for the hashtable.

Method Detail

getRoutes

public java.util.Enumeration getRoutes()

getNeighbors

public java.util.Enumeration getNeighbors()

routeCount

public int routeCount()

neighborCount

public int neighborCount()

getRoute

public RouteEntry getRoute(int activeDest)
Retrive the current route to get to the given active address.

getRoute

public RouteEntry getRoute(java.lang.Integer activeDest)

JNodeOS v1.1.5 API

This documentation is Copyright (C) 1998-2001 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project: http://www.cs.utah.edu/flux/janos/