Class NetworkDatacenter
- java.lang.Object
-
- org.cloudbus.cloudsim.core.CloudSimEntity
-
- org.cloudbus.cloudsim.datacenters.DatacenterSimple
-
- org.cloudbus.cloudsim.datacenters.network.NetworkDatacenter
-
- All Implemented Interfaces:
Cloneable
,Comparable<SimEntity>
,Runnable
,Identifiable
,Nameable
,SimEntity
,Datacenter
,PowerAware
public class NetworkDatacenter extends DatacenterSimple
NetworkDatacenter class is aDatacenter
whose hostList are virtualized and networked. It contains all the information about internal network. For example, which VM is connected to what switch, etc.Please refer to following publication for more details:
- Author:
- Saurabh Kumar Garg, Manoel Campos da Silva Filho
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.cloudbus.cloudsim.core.SimEntity
SimEntity.State
-
-
Field Summary
-
Fields inherited from interface org.cloudbus.cloudsim.datacenters.Datacenter
DEF_BW_PERCENT_FOR_MIGRATION, NULL
-
-
Constructor Summary
Constructors Constructor Description NetworkDatacenter(Simulation simulation, List<? extends Host> hostList, VmAllocationPolicy vmAllocationPolicy)
Creates a NetworkDatacenter with the given parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSwitch(Switch swt)
Adds aSwitch
to the Datacenter.List<Switch>
getEdgeSwitch()
Gets a map of all Edge Switches in the Datacenter network, where each key is the switch id and each value is the switch itself.List<Switch>
getSwitchMap()
Gets a read-only list of network Datacenter's Switches.-
Methods inherited from class org.cloudbus.cloudsim.datacenters.DatacenterSimple
addHost, addHostList, addOnHostAvailableListener, checkCloudletsCompletionForAllHosts, disableMigrations, enableMigrations, equals, finishVmMigration, getBandwidthPercentForMigration, getCharacteristics, getCloudletProcessingUpdateInterval, getDatacenterStorage, getHost, getHostById, getHostList, getLastProcessTime, getPower, getSchedulingInterval, getVmAllocationPolicy, getVmList, hashCode, isMigrationsEnabled, processCloudlet, processCloudletCancel, processCloudletPause, processCloudletResume, processCloudletSubmit, processEvent, processPingRequest, processVmCreate, processVmDestroy, removeHost, setBandwidthPercentForMigration, setDatacenterStorage, setLastProcessTime, setSchedulingInterval, setVmAllocationPolicy, shutdownEntity, startEntity, toString, updateCloudletProcessing
-
Methods inherited from class org.cloudbus.cloudsim.core.CloudSimEntity
cancelEvent, clone, compareTo, getId, getName, getNextEvent, getNextEvent, getSimulation, getState, isAlive, isFinished, isStarted, numEventsWaiting, numEventsWaiting, pause, run, schedule, schedule, schedule, schedule, schedule, scheduleFirst, scheduleFirst, scheduleFirstNow, scheduleFirstNow, scheduleNow, scheduleNow, selectEvent, send, send, sendNow, sendNow, setEventBuffer, setId, setName, setSimulation, setStarted, setState, start, waitForEvent
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Comparable
compareTo
-
Methods inherited from interface org.cloudbus.cloudsim.core.Identifiable
getId
-
Methods inherited from interface org.cloudbus.cloudsim.power.models.PowerAware
getPowerInKWattsHour
-
-
-
-
Constructor Detail
-
NetworkDatacenter
public NetworkDatacenter(Simulation simulation, List<? extends Host> hostList, VmAllocationPolicy vmAllocationPolicy)
Creates a NetworkDatacenter with the given parameters.- Parameters:
simulation
- The CloudSim instance that represents the simulation the Entity is related tohostList
- list ofHost
s that will compound the DatacentervmAllocationPolicy
- the policy to be used to allocate VMs into hosts- Throws:
IllegalArgumentException
- when this entity has zero number of PEs (Processing Elements).
No PEs mean the Cloudlets can't be processed. A CloudResource must contain one or more Machines. A Machine must contain one or more PEs.
-
-
Method Detail
-
getEdgeSwitch
public List<Switch> getEdgeSwitch()
Gets a map of all Edge Switches in the Datacenter network, where each key is the switch id and each value is the switch itself. One can design similar functions for other type of Datacenter.- Returns:
-
addSwitch
public void addSwitch(Switch swt)
Adds aSwitch
to the Datacenter.- Parameters:
swt
- the Switch to be added
-
-