Class GlobalNameServer

java.lang.Object
  extended by GlobalNameServer

public class GlobalNameServer
extends java.lang.Object

This class represents the global name server.

Version:
1.2 (06/2005)
Author:
Yin Xiong, Glenn Matthews

Field Summary
(package private)  java.util.Vector<RoutingInfo> routingTable
          A vector that stores the global routing information
 
Constructor Summary
GlobalNameServer()
          Construct a new GlobalNameServer object.
 
Method Summary
 int addRoutingRow(RoutingInfo rinfo)
          Adds a row of routing inforamtion into the lookup table.
 void dump()
          Displays the contents of the routing table.
 java.lang.String getAPPids()
          Returns (as a tab-separated list) the APPids of every LP in the application.
 int getLidByAid(java.lang.String appid)
          Looks up the LP id of an LP by its application id.
 int getPidByAid(java.lang.String appid)
          Looks up the PE id of an LP by its application id.
 int getPidByLid(int lid)
          Looks up the PE id of an LP by its LP id.
 RoutingInfo getRoutingInfoByAid(java.lang.String appid)
          Looks up the routing info by an LP's application id.
 RoutingInfo getRoutingInfoByLid(int lid)
          Looks up the routing info by an LP id.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

routingTable

java.util.Vector<RoutingInfo> routingTable
A vector that stores the global routing information

Constructor Detail

GlobalNameServer

public GlobalNameServer()
Construct a new GlobalNameServer object.

Method Detail

addRoutingRow

public int addRoutingRow(RoutingInfo rinfo)
Adds a row of routing inforamtion into the lookup table.

Parameters:
rinfo - an RoutingInfo instance representing a row in the table.
Returns:
the size of the lookup table.

getRoutingInfoByAid

public RoutingInfo getRoutingInfoByAid(java.lang.String appid)
Looks up the routing info by an LP's application id.

Parameters:
appid - String representing the application id of the LP.

getRoutingInfoByLid

public RoutingInfo getRoutingInfoByLid(int lid)
Looks up the routing info by an LP id.

Parameters:
lid - int representing the LP id.

dump

public void dump()
Displays the contents of the routing table.


getAPPids

public java.lang.String getAPPids()
Returns (as a tab-separated list) the APPids of every LP in the application.

Since:
1.2

getPidByLid

public int getPidByLid(int lid)
Looks up the PE id of an LP by its LP id.

Parameters:
lid - int representing the LPid of the LP.

getPidByAid

public int getPidByAid(java.lang.String appid)
Looks up the PE id of an LP by its application id.

Parameters:
appid - String representing the application id of the LP.

getLidByAid

public int getLidByAid(java.lang.String appid)
Looks up the LP id of an LP by its application id.

Parameters:
appid - String representing the application id of the LP.