|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectLocalNameServer
public class LocalNameServer
This class represents the local name server that routes the messages among PEs. Each PE has a related local name server.
Field Summary | |
---|---|
(package private) java.lang.String |
gns
The address of the global name server. |
(package private) int |
PEid
The ID of the PE this local name server serves. |
(package private) java.util.Vector<RoutingInfo> |
routingTable
A vector that stores the LP address information |
Constructor Summary | |
---|---|
LocalNameServer(int pid)
Construct a new LocalNameServer object. |
Method Summary | |
---|---|
int |
addRoutingInfo(RoutingInfo rinfo)
Adds a row of routing inforamtion into the routing table. |
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 known LP. |
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. |
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 |
---|
int PEid
java.lang.String gns
java.util.Vector<RoutingInfo> routingTable
Constructor Detail |
---|
public LocalNameServer(int pid)
pid
- int the system-assigned id of this PEMethod Detail |
---|
public int addRoutingRow(RoutingInfo rinfo)
rinfo
- an RoutingInfo instance representing a row in the table.
public void dump()
public RoutingInfo getRoutingInfoByAid(java.lang.String appid)
appid
- String representing the application id of the LP.public RoutingInfo getRoutingInfoByLid(int lid)
lid
- int representing the LP id.public int addRoutingInfo(RoutingInfo rinfo)
rinfo
- an RoutingInfo instance representing a row in the table.
public int getPidByAid(java.lang.String appid)
appid
- String representing the application id of the LP.public int getLidByAid(java.lang.String appid)
appid
- String representing the application id of the LP.public java.lang.String getAPPids()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |