Package network
Class Rack
java.lang.Object
network.Rack
public class Rack
extends java.lang.Object
Network Rack
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Rack(int servers, int rackid, int cnt)
construct a rack by providing number of servers, rackid and number of racks already in the network -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
id
int idrack ID -
pod
int podpod id if defined in network topology -
ToRswitch
int ToRswitchToR switch id -
servers
IDs of the servers in the rack
-
-
Constructor Details
-
Rack
public Rack(int servers, int rackid, int cnt)construct a rack by providing number of servers, rackid and number of racks already in the network
-
-
Method Details
-
getids
public java.lang.String getids()print rack and TOR switch ids -
gettor
public int gettor()get TOR switch id -
getservers
public int getservers()get number of servers -
getserver
get a single server -
setpod
public void setpod(int p)set pod id -
getpod
public int getpod()get pod id
-