|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
GNS
public class GNS
This class represents the Global Name Server that create the simulation world and maintains the routing information for all the PEs.
Field Summary | |
---|---|
(package private) Flag |
flag
the flag indicating the end of the simulation |
(package private) java.util.Vector<LPConfigInfo> |
lpConfigInfoVector
the vector that contains the LP configuration information obtained from a file |
(package private) int |
lpForEach
the number of LPs for each PE |
(package private) int |
lpForFirst
the number of LPs for the first PE which can be different from other PEs |
(package private) int |
numLPs
the total number of LPs for this simulation |
(package private) int |
numPEs
the total number of PEs for this simulation |
(package private) int |
PEcount
the current number of PEs registered with the GNS |
(package private) java.util.Vector<PEInfo> |
PEtable
the table that contains the information about the PEs |
(package private) java.util.Vector<RoutingInfo> |
routingTable
the routing table |
Fields inherited from class java.rmi.server.RemoteObject |
---|
ref |
Constructor Summary | |
---|---|
GNS()
Constructor |
Method Summary | |
---|---|
(package private) void |
dumpPEtable()
Dumps the PEtable; for debugging only |
(package private) void |
dumpRoutingTable()
Prints out the information contained in the routing table; for debugging only |
int |
getEOSflag()
Gets the end of simulation flag. |
(package private) java.util.Vector<LPConfigInfo> |
getLPConfigInfo(boolean isRegistered,
int peid,
java.lang.String peip,
java.lang.String pm,
int begin,
int end)
Returns the LP configuration information to a newly-registered PE. |
(package private) int |
getLPNumForEach()
Returns the number of LPs for each PE. |
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. |
static void |
main(java.lang.String[] args)
main function |
void |
procConfigFile(java.lang.String configFile,
int size)
Processes the configuration file. |
java.util.Vector<LPConfigInfo> |
registerPE(java.lang.String pm)
Remote method that register a new PE and returns the LP configuration information to the new PE. |
void |
setEOSflag(int f)
Sets the end of simulation flag, sends the flag to each PE and shuts down the RMI server for each PE. |
void |
startGNS()
Starts the GNS as a rmi server offering remote methods for the PEs. |
Methods inherited from class java.rmi.server.UnicastRemoteObject |
---|
clone, exportObject, exportObject, exportObject, unexportObject |
Methods inherited from class java.rmi.server.RemoteServer |
---|
getClientHost, getLog, setLog |
Methods inherited from class java.rmi.server.RemoteObject |
---|
equals, getRef, hashCode, toString, toStub |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
Flag flag
int PEcount
java.util.Vector<PEInfo> PEtable
java.util.Vector<RoutingInfo> routingTable
int numPEs
int numLPs
java.util.Vector<LPConfigInfo> lpConfigInfoVector
int lpForEach
int lpForFirst
Constructor Detail |
---|
public GNS() throws java.rmi.RemoteException
java.rmi.RemoteException
Method Detail |
---|
public int getEOSflag()
getEOSflag
in interface GNSInterface
public void setEOSflag(int f)
setEOSflag
in interface GNSInterface
f
- int negative number indicating the end of simulationvoid dumpPEtable()
public void startGNS() throws java.rmi.RemoteException
java.rmi.RemoteException
public java.util.Vector<LPConfigInfo> registerPE(java.lang.String pm)
registerPE
in interface GNSInterface
pm
- String the machine name of the PEpublic static void main(java.lang.String[] args)
void dumpRoutingTable()
public RoutingInfo getRoutingInfoByAid(java.lang.String appid)
getRoutingInfoByAid
in interface GNSInterface
appid
- String representing the application id of the LP.public RoutingInfo getRoutingInfoByLid(int lid)
getRoutingInfoByLid
in interface GNSInterface
lid
- int representing the LP id.public void procConfigFile(java.lang.String configFile, int size)
configFile
- String indicating the name of the configuration file.size
- int the number of PEs.java.util.Vector<LPConfigInfo> getLPConfigInfo(boolean isRegistered, int peid, java.lang.String peip, java.lang.String pm, int begin, int end)
peid
- int the system-wide id for the PEpeip
- String the IP address of this PEpm
- String the machine name of the PEbegin
- int the beginning point of the LP configuration informationend
- int the ending point of the LP configuration informationint getLPNumForEach()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |