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>
NetworkDatacenter class is a
Datacenter
whose hosts have network support.
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
Fields inherited from interface org.cloudbus.cloudsim.datacenters.TimeZoned
MAX_TIME_ZONE_OFFSET, MIN_TIME_ZONE_OFFSET
-
Constructor Summary
ConstructorDescriptionNetworkDatacenter
(Simulation simulation, List<? extends NetworkHost> hostList) Creates a NetworkDatacenter that uses aVmAllocationPolicySimple
as default.NetworkDatacenter
(Simulation simulation, List<? extends NetworkHost> hostList, VmAllocationPolicy vmAllocationPolicy) Creates a NetworkDatacenter with the given parameters. -
Method Summary
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, 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, setupHost, setVmAllocationPolicy, shutdown, size, startInternal, toString, updateActiveHostsNumber, updateCloudletProcessing, updateHostsProcessing
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 NetworkHost> hostList, VmAllocationPolicy vmAllocationPolicy) Creates a NetworkDatacenter with the given parameters.- Parameters:
simulation
- The CloudSim instance that represents the simulation the Entity belongs tohostList
- list ofHost
s that will compound the DatacentervmAllocationPolicy
- the policy to be used to allocate VMs into hosts- Throws:
IllegalArgumentException
- when this Host has zero number of PEs (Processing Elements).
-
NetworkDatacenter
Creates a NetworkDatacenter that uses aVmAllocationPolicySimple
as default.- Parameters:
simulation
- The CloudSim instance that represents the simulation the Entity belongs tohostList
- list ofHost
s that will compound the Datacenter- Throws:
IllegalArgumentException
- when this Host has zero number of PEs (Processing Elements).
-
-
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'sSwitch
es.- Returns:
-
getHostList
Description copied from interface:Datacenter
Gets an unmodifiable host list.- Specified by:
getHostList
in interfaceDatacenter
- Overrides:
getHostList
in classDatacenterSimple
- Returns:
- the host list
-