Package network
Class Switch
java.lang.Object
network.Switch
public class Switch
extends java.lang.Object
network switch
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.ArrayList<java.lang.Integer>connectedtoIDs of connected nodesintidswitch ID(package private) java.lang.Stringtypeswitch type: edge,core,aggregation, ToR, leaf, spine etc -
Constructor Summary
Constructors Constructor Description Switch(int id)construct switch, set its id -
Method Summary
Modifier and Type Method Description voidconnetto(int c)add serverx connected to the switchjava.lang.Stringgetconnections()print connected serversjava.util.ArrayList<java.lang.Integer>getcons()get connected serversintgetid()get idjava.lang.Stringgettype()get switch typevoidsetid(int s)set idvoidsettype(java.lang.String s)set switch typeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
id
public int idswitch ID -
type
java.lang.String typeswitch type: edge,core,aggregation, ToR, leaf, spine etc -
connectedto
java.util.ArrayList<java.lang.Integer> connectedtoIDs of connected nodes
-
-
Constructor Details
-
Switch
public Switch(int id)construct switch, set its id
-
-
Method Details
-
connetto
public void connetto(int c)add serverx connected to the switch -
settype
public void settype(java.lang.String s)set switch type -
gettype
public java.lang.String gettype()get switch type -
getconnections
public java.lang.String getconnections()print connected servers -
getcons
public java.util.ArrayList<java.lang.Integer> getcons()get connected servers -
setid
public void setid(int s)set id -
getid
public int getid()get id
-