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
,Sizeable
,Datacenter
,TimeZoned
,PowerAware<PowerModelDatacenter>
public class NetworkDatacenter extends DatacenterSimple
NetworkDatacenter class is a
Datacenter
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, LOGGER, NULL
-
Constructor Summary
Constructors Constructor Description NetworkDatacenter(Simulation simulation, List<? extends Host> hostList, VmAllocationPolicy vmAllocationPolicy)
Creates a NetworkDatacenter with the given parameters. -
Method Summary
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, addOnVmMigrationFinishListener, disableMigrations, enableMigrations, equals, finishVmMigration, getActiveHostsNumber, getActiveHostStream, getBandwidthPercentForMigration, getCharacteristics, getCloudletProcessingUpdateInterval, getDatacenterStorage, getHost, getHostById, getHostList, getHostSearchRetryDelay, getLastProcessTime, getPowerModel, getSchedulingInterval, getTimeZone, getVmAllocationPolicy, hashCode, isMigrationsEnabled, processCloudlet, processCloudletCancel, processCloudletPause, processCloudletResume, processCloudletSubmit, processEvent, processPingRequest, processVmDestroy, removeHost, requestVmMigration, requestVmMigration, setBandwidthPercentForMigration, setDatacenterStorage, setHostSearchRetryDelay, setLastProcessTime, setPowerModel, setSchedulingInterval, setTimeZone, setVmAllocationPolicy, shutdown, size, startInternal, toString, updateCloudletProcessing
Methods inherited from class org.cloudbus.cloudsim.core.CloudSimEntity
cancelEvent, clone, compareTo, getId, getName, getNextEvent, getNextEvent, getShutdownTime, getSimulation, getStartTime, getState, isAlive, isFinished, isStarted, pause, run, run, schedule, schedule, schedule, schedule, schedule, schedule, scheduleFirst, scheduleFirst, scheduleFirstNow, scheduleFirstNow, scheduleNow, scheduleNow, selectEvent, send, send, sendNow, sendNow, setEventBuffer, setId, setName, setSimulation, 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.core.SimEntity
getShutdownTime, getSimulation, getStartTime, getState, isAlive, isFinished, isStarted, run, schedule, schedule, schedule, schedule, schedule, schedule, schedule, setName, setSimulation, setState, start
Methods inherited from interface org.cloudbus.cloudsim.datacenters.TimeZoned
distance, validateTimeZone
-
Constructor Details
-
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 Details
-
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
Adds aSwitch
to the Datacenter.- Parameters:
swt
- the Switch to be added
-
getSwitchMap
Gets a read-only list of network Datacenter's Switches.- Returns:
-