ostore.tapestry.impl
Class RouteEntry

java.lang.Object
  |
  +--ostore.tapestry.impl.RouteEntry

public class RouteEntry
extends Object

Implements the routing table entry

Version:
$Id: RouteEntry.java,v 1.2 2002/01/11 09:40:41 ravenben Exp $
Author:
Ben Y. Zhao

Field Summary
static int REDUNDANT_LVL
           
 
Constructor Summary
RouteEntry()
           
RouteEntry(NodeId route, Long latency)
           
 
Method Summary
 void add(NodeId newnode, Long latency)
           
 NodeId getAtIndex(int i)
           
 NodeId getFirst()
           
 int size()
           
 void sortbyLatency()
           
 void switchRoutes(int from, int to)
           
 String toString()
           
 void updateLatency(NodeId route, Long latency)
          Search to see if route is actually part of this routeEntry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

REDUNDANT_LVL

public static final int REDUNDANT_LVL
Constructor Detail

RouteEntry

public RouteEntry()

RouteEntry

public RouteEntry(NodeId route,
                  Long latency)
Method Detail

getFirst

public NodeId getFirst()

getAtIndex

public NodeId getAtIndex(int i)

add

public void add(NodeId newnode,
                Long latency)

switchRoutes

public void switchRoutes(int from,
                         int to)

sortbyLatency

public void sortbyLatency()

updateLatency

public void updateLatency(NodeId route,
                          Long latency)
Search to see if route is actually part of this routeEntry. If so, then update its latency, and then do a sort to reorder the routes by latency

toString

public String toString()
Overrides:
toString in class Object

size

public int size()