Package cloudreports.models
Class HostRegistry
java.lang.Object
cloudreports.models.HostRegistry
- All Implemented Interfaces:
Serializable
public final class HostRegistry extends Object implements 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:
- Serialized Form
-
Constructor Summary
Constructors Constructor Description HostRegistry()
-
Method Summary
Modifier and Type Method Description boolean
canRunVM(VmRegistry vmr)
Indicates whether the host can allocate a virtual machine or not.boolean
equals(Object host)
int
getAmount()
Gets the amount of hosts with this configuration.long
getBw()
Gets the host's bandwidth.String
getBwProvisioner()
Gets the name suffix of the class for Host'sBandwidth
ResourceProvisioner
.int
getId()
Gets the host's id.double
getMaxPower()
Gets the host's maximum power consumption.double
getMips()
Gets the amount of mips per processing elements.String
getPeProvisioner()
Gets the name suffix of the class for the Host'sPeProvisioner
.int
getPes()
Gets the host's number of processing elements.String
getPowerModel()
Gets the name suffix of the class for Host'sPowerModel
.int
getRam()
Gets the host's amount of RAM.String
getRamProvisioner()
Gets the name suffix of the class for the host's RAMResourceProvisioner
.double
getStaticPowerPercent()
Gets the host's static power consumption percent.long
getStorage()
Gets the host's storage capacity.String
getVmScheduler()
Gets the class name suffix for the Host'sVmScheduler
.int
hashCode()
void
setAmount(int amount)
Sets the amount of hosts with this configuration.void
setBw(long bw)
Sets the host's bandwidth.void
setBwProvisioner(String bwProvisioner)
Sets the name suffix of the class for Host'sBandwidth
ResourceProvisioner
.void
setId(int id)
Sets the host's id.void
setMaxPower(double maxPower)
Sets the host's maximum power consumption.void
setMips(double mips)
Sets the amount of mips per processing elements.void
setPeProvisioner(String peProvisioner)
Sets the name suffix of the class for the Host'sPeProvisioner
.void
setPes(int numOfpes)
Sets the host's number of processing elements.void
setPowerModel(String powerModel)
Sets the host's power model alias.void
setRam(int ram)
Sets the host's amount of RAM.void
setRamProvisioner(String ramProvisioner)
Sets the name suffix of the class for the host's RAMResourceProvisioner
.void
setStaticPowerPercent(double staticPowerPercent)
Sets the host's static power consumption percent.void
setStorage(long storage)
Sets the host's storage capacity.void
setVmScheduler(String vmScheduler)
Sets the host's scheduling policy.String
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'sBandwidth
ResourceProvisioner
.- Returns:
-
setBwProvisioner
Sets the name suffix of the class for Host'sBandwidth
ResourceProvisioner
.- 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:
true
if the host can allocate the virtual machine;false
otherwise.- Since:
- 1.0
-
equals
-
hashCode
public int hashCode() -
toString
-