Package network

Class Rack

java.lang.Object
network.Rack

public class Rack
extends java.lang.Object
Network Rack
  • Field Summary

    Fields
    Modifier and Type Field Description
    (package private) int id
    rack ID
    (package private) int pod
    pod id if defined in network topology
    java.util.ArrayList<Server> servers
    IDs of the servers in the rack
    (package private) int ToRswitch
    ToR switch id
  • 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

    Modifier and Type Method Description
    java.lang.String getids()
    print rack and TOR switch ids
    int getpod()
    get pod id
    Server getserver​(int s)
    get a single server
    int getservers()
    get number of servers
    int gettor()
    get TOR switch id
    void setpod​(int p)
    set pod id

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      int id
      rack ID
    • pod

      int pod
      pod id if defined in network topology
    • ToRswitch

      int ToRswitch
      ToR switch id
    • servers

      public java.util.ArrayList<Server> 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

      public Server getserver​(int s)
      get a single server
    • setpod

      public void setpod​(int p)
      set pod id
    • getpod

      public int getpod()
      get pod id