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:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether the host can allocate a virtual machine or not.
    boolean
    equals(Object host)
     
    int
    Gets the amount of hosts with this configuration.
    long
    Gets the host's bandwidth.
    Gets the name suffix of the class for Host's Bandwidth ResourceProvisioner.
    int
    Gets the host's id.
    double
    Gets the host's maximum power consumption.
    double
    Gets the amount of mips per processing elements.
    Gets the name suffix of the class for the Host's PeProvisioner.
    int
    Gets the host's number of processing elements.
    Gets the name suffix of the class for Host's PowerModel.
    int
    Gets the host's amount of RAM.
    Gets the name suffix of the class for the host's RAM ResourceProvisioner.
    double
    Gets the host's static power consumption percent.
    long
    Gets the host's storage capacity.
    Gets the class name suffix for the Host's VmScheduler.
    int
     
    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's Bandwidth 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's PeProvisioner.
    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 RAM ResourceProvisioner.
    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.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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

      public String getVmScheduler()
      Gets the class name suffix for the Host's VmScheduler.
      Returns:
    • setVmScheduler

      public void setVmScheduler(String vmScheduler)
      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

      public String getPowerModel()
      Gets the name suffix of the class for Host's PowerModel.
      Returns:
    • setPowerModel

      public void setPowerModel(String powerModel)
      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

      public String getRamProvisioner()
      Gets the name suffix of the class for the host's RAM ResourceProvisioner.
      Returns:
    • setRamProvisioner

      public void setRamProvisioner(String ramProvisioner)
      Sets the name suffix of the class for the host's RAM ResourceProvisioner.
      Parameters:
      ramProvisioner - the host's RAM provisioner class name suffix to set.
    • getBwProvisioner

      public String getBwProvisioner()
      Gets the name suffix of the class for Host's Bandwidth ResourceProvisioner.
      Returns:
    • setBwProvisioner

      public void setBwProvisioner(String bwProvisioner)
      Sets the name suffix of the class for Host's Bandwidth ResourceProvisioner.
      Parameters:
      bwProvisioner - the host's bandwidth provisioner class name suffix to set.
    • getPeProvisioner

      public String getPeProvisioner()
      Gets the name suffix of the class for the Host's PeProvisioner.
      Returns:
    • setPeProvisioner

      public void setPeProvisioner(String peProvisioner)
      Sets the name suffix of the class for the Host's PeProvisioner.
      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

      public boolean canRunVM(VmRegistry vmr)
      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

      public boolean equals(Object host)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object