public class Switch extends SimEntity
| Modifier and Type | Field and Description |
|---|---|
List<Vm> |
BagofTaskVm |
int |
datacenterid |
NetworkDatacenter |
dc |
double |
downlinkbandwidth |
List<Switch> |
downlinkswitches |
Map<Integer,List<NetworkPacket>> |
downlinkswitchpktlist |
SortedMap<Double,List<NetworkHost>> |
fintimelistHost |
SortedMap<Double,List<NetworkVm>> |
fintimelistVM |
Map<Integer,NetworkHost> |
hostlist |
int |
id |
double |
latency |
int |
level |
double |
numport |
Map<Integer,List<NetworkPacket>> |
packetTohost |
ArrayList<NetworkPacket> |
pktlist |
double |
switching_delay |
double |
uplinkbandwidth |
List<Switch> |
uplinkswitches |
Map<Integer,List<NetworkPacket>> |
uplinkswitchpktlist |
Map<Integer,NetworkVm> |
Vmlist |
| Constructor and Description |
|---|
Switch(String name,
int level,
NetworkDatacenter dc) |
| Modifier and Type | Method and Description |
|---|---|
protected List<NetworkHost> |
getfreehostlist(int numhost) |
protected 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 Map<Integer,List<NetworkPacket>> uplinkswitchpktlist
public Map<Integer,List<NetworkPacket>> downlinkswitchpktlist
public Map<Integer,NetworkHost> hostlist
public Map<Integer,List<NetworkPacket>> packetTohost
public double uplinkbandwidth
public double downlinkbandwidth
public double latency
public double numport
public NetworkDatacenter dc
public SortedMap<Double,List<NetworkHost>> fintimelistHost
public ArrayList<NetworkPacket> pktlist
public double switching_delay
public Switch(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 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 SimEntityCopyright © 2012 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.