public class NetworkHost extends HostSimple
HostSimple
to support simulation of
networked datacenters. It executes actions related to management of packets
(sent and received) other than that of virtual machines (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 following publication for more details:
Constructor and Description |
---|
NetworkHost(int id,
ResourceProvisioner ramProvisioner,
ResourceProvisioner bwProvisioner,
long storage,
List<Pe> peList,
VmScheduler vmScheduler)
Deprecated.
Use the other available constructors with less parameters
and set the remaining ones using the respective setters.
This constructor will be removed in future versions.
|
NetworkHost(long ram,
long bw,
long storage,
List<Pe> peList)
Creates a NetworkHost.
|
Modifier and Type | Method and Description |
---|---|
void |
addReceivedNetworkPacket(HostPacket hostPacket)
Adds a packet to the list of received packets in order
to further submit them to the respective target VMs and Cloudlets.
|
boolean |
createVm(Vm vm)
Try to allocate resources to a new VM in the Host.
|
double |
getBandwidth()
Gets the Host bandwidth capacity in Megabits/s.
|
EdgeSwitch |
getEdgeSwitch() |
double |
getMaxUtilizationAmongVmsPes(Vm vm)
Gets the maximum utilization among the PEs of a given VM.
|
int |
getTotalDataTransferBytes() |
void |
setBandwidth(double bandwidth)
Sets the Host bandwidth capacity in Megabits/s.
|
void |
setEdgeSwitch(EdgeSwitch sw) |
double |
updateProcessing(double currentTime)
Updates the processing of VMs running on this Host,
that makes the processing of cloudlets inside such VMs to be updated.
|
addMigratingInVm, addOnUpdateProcessingListener, addVmMigratingOut, addVmToList, allocatePesForVm, compareTo, computeCpuUtilizationPercent, createTemporaryVm, deallocatePesForVm, deallocateResourcesOfAllVms, deallocateResourcesOfVm, destroyAllVms, destroyTemporaryVm, destroyVm, equals, getAllocatedMipsForVm, getAvailableMips, getAvailableStorage, getBw, getBwProvisioner, getDatacenter, getId, getMaxAvailableMips, getMips, getNumberOfFailedPes, getNumberOfFreePes, getNumberOfPes, getNumberOfWorkingPes, getPeList, getProvisioner, getRam, getRamProvisioner, getResources, getSimulation, getStorage, getTotalAllocatedMipsForVm, getTotalMipsCapacity, getUtilizationOfBw, getUtilizationOfCpu, getUtilizationOfCpuMips, getUtilizationOfRam, getVm, getVmList, getVmScheduler, getVmsMigratingIn, getVmsMigratingOut, getWorkingPeList, hashCode, isActive, isFailed, isSuitableForVm, reallocateMigratingInVms, removeMigratingInVm, removeOnUpdateProcessingListener, removeVmFromList, removeVmMigratingIn, removeVmMigratingOut, setActive, setBwProvisioner, setDatacenter, setFailed, setId, setPeList, setPeStatus, setRamProvisioner, setSimulation, setVmScheduler, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getResource
public NetworkHost(long ram, long bw, long storage, List<Pe> peList)
ram
- the RAM capacity in Megabytesbw
- the Bandwidth (BW) capacity in Megabits/sstorage
- the storage capacity in MegabytespeList
- the host's Pe
list@Deprecated public NetworkHost(int id, ResourceProvisioner ramProvisioner, ResourceProvisioner bwProvisioner, long storage, List<Pe> peList, VmScheduler vmScheduler)
id
- the idramProvisioner
- the ram provisionerbwProvisioner
- the bw provisionerstorage
- the storage capacitypeList
- the host's PEs listvmScheduler
- the VM schedulerpublic double updateProcessing(double currentTime)
Host
updateProcessing
in interface Host
updateProcessing
in class HostSimple
currentTime
- the current timeDouble.MAX_VALUE
if there is no next Cloudlet to executepublic boolean createVm(Vm vm)
It also creates and sets a PacketScheduler
for each
Vm that doesn't have one already.
createVm
in interface Host
createVm
in class HostSimple
vm
- Vm being startedpublic double getMaxUtilizationAmongVmsPes(Vm vm)
vm
- The VM to get its PEs maximum utilizationpublic EdgeSwitch getEdgeSwitch()
public void setEdgeSwitch(EdgeSwitch sw)
public int getTotalDataTransferBytes()
public void addReceivedNetworkPacket(HostPacket hostPacket)
hostPacket
- received network packetpublic double getBandwidth()
public void setBandwidth(double bandwidth)
bandwidth
- the bandwidth to setCopyright © 2015–2017 Systems, Security and Image Communication Lab - Instituto de Telecomunicações (IT) - Universidade da Beira Interior (UBI) - Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO). All rights reserved.