public class Switch extends SimEntity
| Modifier and Type | Field and Description |
|---|---|
java.util.List<Vm> |
BagofTaskVm |
int |
datacenterid |
NetworkDatacenter |
dc |
double |
downlinkbandwidth |
java.util.List<Switch> |
downlinkswitches |
java.util.Map<java.lang.Integer,java.util.List<NetworkPacket>> |
downlinkswitchpktlist |
java.util.SortedMap<java.lang.Double,java.util.List<NetworkHost>> |
fintimelistHost |
java.util.SortedMap<java.lang.Double,java.util.List<NetworkVm>> |
fintimelistVM |
java.util.Map<java.lang.Integer,NetworkHost> |
hostlist |
int |
id |
double |
latency |
int |
level |
double |
numport |
java.util.Map<java.lang.Integer,java.util.List<NetworkPacket>> |
packetTohost |
java.util.ArrayList<NetworkPacket> |
pktlist |
double |
switching_delay |
double |
uplinkbandwidth |
java.util.List<Switch> |
uplinkswitches |
java.util.Map<java.lang.Integer,java.util.List<NetworkPacket>> |
uplinkswitchpktlist |
java.util.Map<java.lang.Integer,NetworkVm> |
Vmlist |
| Constructor and Description |
|---|
Switch(java.lang.String name,
int level,
NetworkDatacenter dc) |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<NetworkHost> |
getfreehostlist(int numhost) |
protected java.util.List<NetworkVm> |
getfreeVmlist(int numVMReq) |
protected NetworkHost |
getHostwithVM(int vmid) |
void |
processEvent(SimEvent ev)
This method is invoked by the
Simulation class whenever there is an event in the
deferred queue, which needs to be processed by the entity. |
protected void |
processhostpacket(SimEvent ev) |
protected void |
processpacket_down(SimEvent ev) |
protected void |
processpacket_up(SimEvent ev) |
protected void |
processpacket(SimEvent ev) |
protected void |
processpacketforward(SimEvent ev) |
void |
shutdownEntity()
This method is invoked by the
Simulation before the simulation finishes. |
void |
startEntity()
This method is invoked by the
Simulation class when the simulation is started. |
cancelEvent, clone, getEventBuffer, getId, getName, getNextEvent, getNextEvent, getState, numEventsWaiting, numEventsWaiting, pause, run, schedule, schedule, schedule, schedule, scheduleFirst, scheduleFirst, scheduleFirst, scheduleFirst, scheduleFirstNow, scheduleFirstNow, scheduleFirstNow, scheduleFirstNow, scheduleNow, scheduleNow, scheduleNow, scheduleNow, selectEvent, send, send, send, send, sendNow, sendNow, sendNow, sendNow, setEventBuffer, setId, setState, waitForEventpublic int id
public int level
public int datacenterid
public java.util.Map<java.lang.Integer,java.util.List<NetworkPacket>> uplinkswitchpktlist
public java.util.Map<java.lang.Integer,java.util.List<NetworkPacket>> downlinkswitchpktlist
public java.util.Map<java.lang.Integer,NetworkHost> hostlist
public java.util.List<Switch> uplinkswitches
public java.util.List<Switch> downlinkswitches
public java.util.Map<java.lang.Integer,java.util.List<NetworkPacket>> packetTohost
public double uplinkbandwidth
public double downlinkbandwidth
public double latency
public double numport
public NetworkDatacenter dc
public java.util.SortedMap<java.lang.Double,java.util.List<NetworkHost>> fintimelistHost
public java.util.SortedMap<java.lang.Double,java.util.List<NetworkVm>> fintimelistVM
public java.util.ArrayList<NetworkPacket> pktlist
public java.util.List<Vm> BagofTaskVm
public double switching_delay
public java.util.Map<java.lang.Integer,NetworkVm> Vmlist
public Switch(java.lang.String name,
int level,
NetworkDatacenter dc)
public void startEntity()
SimEntitySimulation class when the simulation is started. This
method should be responsible for starting the entity up.startEntity in class SimEntitypublic void processEvent(SimEvent ev)
SimEntitySimulation class whenever there is an event in the
deferred queue, which needs to be processed by the entity.processEvent in class SimEntityev - the event to be processed by the entityprotected void processhostpacket(SimEvent ev)
protected void processpacket_down(SimEvent ev)
protected void processpacket_up(SimEvent ev)
protected void processpacket(SimEvent ev)
protected void processpacketforward(SimEvent ev)
protected NetworkHost getHostwithVM(int vmid)
protected java.util.List<NetworkVm> getfreeVmlist(int numVMReq)
protected java.util.List<NetworkHost> getfreehostlist(int numhost)
public void shutdownEntity()
SimEntitySimulation before the simulation finishes. If you want
to save data in log files this is the method in which the corresponding code would be placed.shutdownEntity in class SimEntity