Class NetworkHost
java.lang.Object
org.cloudsimplus.core.StartableAbstract
org.cloudsimplus.core.ExecDelayableAbstract
org.cloudsimplus.hosts.HostAbstract
org.cloudsimplus.hosts.HostSimple
org.cloudsimplus.hosts.network.NetworkHost
- All Implemented Interfaces:
Comparable<Host>,ChangeableId,ExecDelayable,Identifiable,Machine<FileStorage>,PhysicalMachine,ResourceStatsComputer<HostResourceStats>,Startable,Host,PowerAware<PowerModelHost>,Resourceful
A Host that support simulation of networked
Datacenters. It executes actions related to the management of packets
(sent and received) besides Vm management (e.g., creation and destruction).
A Host has a defined policy for provisioning memory and bw, as
well as an allocation policy for Pe's to virtual machines.
Please refer to the following publication for more details:
- Since:
- CloudSim Toolkit 3.0
- Author:
- Saurabh Kumar Garg
-
Field Summary
FieldsFields inherited from class org.cloudsimplus.hosts.HostAbstract
activateOnDatacenterStartup, bw, cpuUtilizationStats, datacenter, defaultBwCapacity, defaultRamCapacity, defaultStorageCapacity, disk, id, idleShutdownDeadline, lazySuitabilityEvaluation, onShutdownListeners, onStartupListeners, onUpdateProcessingListeners, powerModel, provisioners, ram, resources, stateHistory, vmCreatedList, vmsMigratingIn, vmsMigratingOutFields inherited from interface org.cloudsimplus.hosts.Host
DEF_IDLE_SHUTDOWN_DEADLINEFields inherited from interface org.cloudsimplus.core.Startable
NOT_ASSIGNED -
Constructor Summary
ConstructorsConstructorDescriptionNetworkHost(long ram, long bw, long storage, List<Pe> peList) Creates and starts up a NetworkHost using aVmSchedulerSpaceSharedas default. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReceivedNetworkPacket(HostPacket hostPacket) Adds a packet to the list of received packets to further submit them to the respective target VMs and Cloudlets.Try to allocate resources to a new VM in the Host.doubleupdateProcessing(double currentTime) Updates the processing of VMs running on this Host, that makes the processing of Cloudlets inside such VMs to be updated.Methods inherited from class org.cloudsimplus.hosts.HostSimple
compareTo, toStringMethods inherited from class org.cloudsimplus.hosts.HostAbstract
addMigratingInVm, addOnShutdownListener, addOnStartupListener, addOnUpdateProcessingListener, addVmMigratingOut, addVmToCreatedList, addVmToList, createTemporaryVm, deallocateResourcesOfVm, destroyAllVms, destroyTemporaryVm, destroyVm, destroyVmInternal, enableUtilizationStats, getAllocatedMipsForVm, getAvailableStorage, getBusyPeList, getBusyPesPercent, getBusyPesPercent, getBw, getBwUtilization, getCpuMipsUtilization, getCpuPercentRequested, getCpuPercentUtilization, getFinishedVms, getFreePeList, getMigratableVms, getMips, getPesNumber, getProvisioner, getRam, getRamUtilization, getResources, getStateHistory, getStorage, getSuitabilityFor, getTotalAllocatedMips, getTotalAllocatedMipsForVm, getTotalAvailableMips, getTotalMipsCapacity, getTotalUpTime, getTotalUpTimeHours, getUpTime, getUpTimeHours, getVmCreatedList, getVmList, getVmsMigratingIn, getVmsMigratingOut, getWorkingPeList, hasEverStarted, hasMigratingVms, incBusyPesNumber, incFailedPesNumber, incFreePesNumber, isFinished, isSuitableForVm, onFinish, onStart, processActivation, reallocateMigratingInVms, removeMigratingInVm, removeOnShutdownListener, removeOnStartupListener, removeOnUpdateProcessingListener, removeVmMigratingOut, setActive, setBwProvisioner, setDatacenter, setDefaultBwCapacity, setDefaultRamCapacity, setDefaultStorageCapacity, setFailed, setPeList, setPeStatus, setPowerModel, setRamProvisioner, setVmScheduler, shutdown, updateVmProcessingMethods inherited from class org.cloudsimplus.core.ExecDelayableAbstract
isShuttingDown, setShutDownDelay, setStartupDelayMethods inherited from class org.cloudsimplus.core.StartableAbstract
getTotalExecutionTime, setFinishTime, setStartTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudsimplus.core.ChangeableId
setIdMethods inherited from interface org.cloudsimplus.core.ExecDelayable
getRemainingStartupTime, getShutdownBeginTime, getShutDownDelay, getStartupCompletionTime, getStartupDelay, isShutDownDelayed, isShuttingDown, isStartingUp, isStartupDelayed, setShutdownBeginTime, setShutDownDelay, setStartupDelayMethods inherited from interface org.cloudsimplus.hosts.Host
getBusyPesNumber, getBwProvisioner, getCpuUtilizationStats, getDatacenter, getFailedPesNumber, getFinishTime, getFirstStartTime, getFreePesNumber, getIdleShutdownDeadline, getPeList, getPowerModel, getRamProvisioner, getVmScheduler, getWorkingPesNumber, isActive, isFailed, isLazySuitabilityEvaluation, isStateHistoryEnabled, setFinishTime, setIdleShutdownDeadline, setLazySuitabilityEvaluation, setSimulation, setStateHistoryEnabledMethods inherited from interface org.cloudsimplus.core.Identifiable
getIdMethods inherited from interface org.cloudsimplus.core.Machine
getIdleInterval, getLastBusyTime, getSimulation, isIdle, isIdleEnoughMethods inherited from interface org.cloudsimplus.core.PhysicalMachine
getExpectedRelativeCpuUtilization, getRelativeBwUtilization, getRelativeCpuUtilization, getRelativeMipsCapacityPercent, getRelativeRamUtilizationMethods inherited from interface org.cloudsimplus.resources.Resourceful
getResourceMethods inherited from interface org.cloudsimplus.core.Startable
getStartTime, getTotalExecutionTime, hasStarted, setLastBusyTime, setStartTime
-
Field Details
-
NULL
-
-
Constructor Details
-
NetworkHost
Creates and starts up a NetworkHost using aVmSchedulerSpaceSharedas default.- Parameters:
ram- the RAM capacity in Megabytesbw- the Bandwidth (BW) capacity in Megabits/sstorage- the storage capacity in MegabytespeList- the host'sPelist
-
-
Method Details
-
updateProcessing
public double updateProcessing(double currentTime) Description copied from interface:HostUpdates the processing of VMs running on this Host, that makes the processing of Cloudlets inside such VMs to be updated.- Specified by:
updateProcessingin interfaceHost- Overrides:
updateProcessingin classHostAbstract- Parameters:
currentTime- the current time- Returns:
- the predicted completion time of the earliest finishing cloudlet
(which is a relative delay from the current simulation time),
or
Double.MAX_VALUEif there is no next Cloudlet to execute
-
createVm
Try to allocate resources to a new VM in the Host.It also creates and sets a
CloudletTaskSchedulerfor each Vm that doesn't have one already.- Specified by:
createVmin interfaceHost- Overrides:
createVmin classHostAbstract- Parameters:
vm- Vm being started- Returns:
- a
HostSuitabilityto indicate if the Vm was placed into the host or not (if the Host doesn't have enough resources to allocate the Vm) - See Also:
-
addReceivedNetworkPacket
Adds a packet to the list of received packets to further submit them to the respective target VMs and Cloudlets.- Parameters:
hostPacket- received network packet
-