Package cloudreports.models
Class HostRegistry
java.lang.Object
cloudreports.models.HostRegistry
- All Implemented Interfaces:
Serializable
A host registry stores information about a specific host configuration.
It contains general information such as scheduling policy, power specifications
and amount of resources.
- Since:
- 1.0
- Author:
- Thiago T. Sá
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRunVM(VmRegistry vmr) Indicates whether the host can allocate a virtual machine or not.booleanintGets the amount of hosts with this configuration.longgetBw()Gets the host's bandwidth.Gets the name suffix of the class for Host'sBandwidthResourceProvisioner.intgetId()Gets the host's id.doubleGets the host's maximum power consumption.doublegetMips()Gets the amount of mips per processing elements.Gets the name suffix of the class for the Host'sPeProvisioner.intgetPes()Gets the host's number of processing elements.Gets the name suffix of the class for Host'sPowerModel.intgetRam()Gets the host's amount of RAM.Gets the name suffix of the class for the host's RAMResourceProvisioner.doubleGets the host's static power consumption percent.longGets the host's storage capacity.Gets the class name suffix for the Host'sVmScheduler.inthashCode()voidsetAmount(int amount) Sets the amount of hosts with this configuration.voidsetBw(long bw) Sets the host's bandwidth.voidsetBwProvisioner(String bwProvisioner) Sets the name suffix of the class for Host'sBandwidthResourceProvisioner.voidsetId(int id) Sets the host's id.voidsetMaxPower(double maxPower) Sets the host's maximum power consumption.voidsetMips(double mips) Sets the amount of mips per processing elements.voidsetPeProvisioner(String peProvisioner) Sets the name suffix of the class for the Host'sPeProvisioner.voidsetPes(int numOfpes) Sets the host's number of processing elements.voidsetPowerModel(String powerModel) Sets the host's power model alias.voidsetRam(int ram) Sets the host's amount of RAM.voidsetRamProvisioner(String ramProvisioner) Sets the name suffix of the class for the host's RAMResourceProvisioner.voidsetStaticPowerPercent(double staticPowerPercent) Sets the host's static power consumption percent.voidsetStorage(long storage) Sets the host's storage capacity.voidsetVmScheduler(String vmScheduler) Sets the host's scheduling policy.toString()
-
Constructor Details
-
HostRegistry
public HostRegistry()
-
-
Method Details
-
getId
public int getId()Gets the host's id.- Returns:
- the host's id.
-
setId
public void setId(int id) Sets the host's id.- Parameters:
id- the host's id.
-
getVmScheduler
Gets the class name suffix for the Host'sVmScheduler.- Returns:
-
setVmScheduler
Sets the host's scheduling policy.- Parameters:
vmScheduler- the host's scheduling policy.
-
getPes
public int getPes()Gets the host's number of processing elements.- Returns:
- the host's number of processing elements.
-
setPes
public void setPes(int numOfpes) Sets the host's number of processing elements.- Parameters:
numOfpes- the host's number of processing elements.
-
getMips
public double getMips()Gets the amount of mips per processing elements.- Returns:
- the amount of mips per processing elements.
-
setMips
public void setMips(double mips) Sets the amount of mips per processing elements.- Parameters:
mips- the amount of mips per processing elements.
-
getMaxPower
public double getMaxPower()Gets the host's maximum power consumption.- Returns:
- the host's maximum power consumption.
-
setMaxPower
public void setMaxPower(double maxPower) Sets the host's maximum power consumption.- Parameters:
maxPower- the host's maximum power consumption.
-
getStaticPowerPercent
public double getStaticPowerPercent()Gets the host's static power consumption percent.- Returns:
- the host's static power consumption percent.
-
setStaticPowerPercent
public void setStaticPowerPercent(double staticPowerPercent) Sets the host's static power consumption percent.- Parameters:
staticPowerPercent- the host's static power consumption percent.
-
getPowerModel
Gets the name suffix of the class for Host'sPowerModel.- Returns:
-
setPowerModel
Sets the host's power model alias.- Parameters:
powerModel- the host's power model alias.
-
getRam
public int getRam()Gets the host's amount of RAM.- Returns:
- the host's amount of RAM.
-
setRam
public void setRam(int ram) Sets the host's amount of RAM.- Parameters:
ram- the host's amount of RAM.
-
getBw
public long getBw()Gets the host's bandwidth.- Returns:
- the host's bandwidth.
-
setBw
public void setBw(long bw) Sets the host's bandwidth.- Parameters:
bw- the host's bandwidth.
-
getRamProvisioner
Gets the name suffix of the class for the host's RAMResourceProvisioner.- Returns:
-
setRamProvisioner
Sets the name suffix of the class for the host's RAMResourceProvisioner.- Parameters:
ramProvisioner- the host's RAM provisioner class name suffix to set.
-
getBwProvisioner
Gets the name suffix of the class for Host'sBandwidthResourceProvisioner.- Returns:
-
setBwProvisioner
Sets the name suffix of the class for Host'sBandwidthResourceProvisioner.- Parameters:
bwProvisioner- the host's bandwidth provisioner class name suffix to set.
-
getPeProvisioner
Gets the name suffix of the class for the Host'sPeProvisioner.- Returns:
-
setPeProvisioner
Sets the name suffix of the class for the Host'sPeProvisioner.- Parameters:
peProvisioner- the host's processing elements provisioner class name suffix to set.
-
getAmount
public int getAmount()Gets the amount of hosts with this configuration.- Returns:
- the amount of hosts with this configuration.
-
setAmount
public void setAmount(int amount) Sets the amount of hosts with this configuration.- Parameters:
amount- the amount of hosts with this configuration.
-
getStorage
public long getStorage()Gets the host's storage capacity.- Returns:
- the host's storage capacity.
-
setStorage
public void setStorage(long storage) Sets the host's storage capacity.- Parameters:
storage- the host's storage capacity.
-
canRunVM
Indicates whether the host can allocate a virtual machine or not.- Parameters:
vmr- the virtual machine to be allocated.- Returns:
trueif the host can allocate the virtual machine;falseotherwise.- Since:
- 1.0
-
equals
-
hashCode
public int hashCode() -
toString
-