Class HostAbstract

All Implemented Interfaces:
Comparable<Host>, ChangeableId, ExecDelayable, Identifiable, Machine<FileStorage>, PhysicalMachine, ResourceStatsComputer<HostResourceStats>, Startable, Host, PowerAware<PowerModelHost>, Resourceful
Direct Known Subclasses:
HostSimple

public abstract class HostAbstract extends ExecDelayableAbstract implements Host
A base class for implementing Hosts.
Since:
CloudSim Plus 8.3.0
Author:
Manoel Campos da Silva Filho
  • Field Details

    • defaultRamCapacity

      protected static long defaultRamCapacity
      The Default RAM capacity (in MB) for creating Hosts. This value is used when the RAM capacity is not given in a Host constructor.
    • defaultBwCapacity

      protected static long defaultBwCapacity
      The Default Bandwidth capacity (in Mbps) for creating Hosts. This value is used when the BW capacity is not given in a Host constructor.
    • defaultStorageCapacity

      protected static long defaultStorageCapacity
      The Default Storage capacity (in MB) for creating Hosts. This value is used when the Storage capacity is not given in a Host constructor.
    • ram

      protected final Ram ram
    • bw

      protected final Bandwidth bw
    • disk

      protected final HarddriveStorage disk
      See Also:
    • stateHistory

      protected final List<HostStateHistoryEntry> stateHistory
      See Also:
    • vmsMigratingIn

      protected final Set<Vm> vmsMigratingIn
      See Also:
    • vmsMigratingOut

      protected final Set<Vm> vmsMigratingOut
      See Also:
    • onUpdateProcessingListeners

      protected final Set<EventListener<HostUpdatesVmsProcessingEventInfo>> onUpdateProcessingListeners
      See Also:
    • onStartupListeners

      protected final List<EventListener<HostEventInfo>> onStartupListeners
      See Also:
    • onShutdownListeners

      protected final List<EventListener<HostEventInfo>> onShutdownListeners
      See Also:
    • vmCreatedList

      protected final List<Vm> vmCreatedList
    • id

      protected long id
    • activateOnDatacenterStartup

      protected boolean activateOnDatacenterStartup
      Indicate whether the Host must be automatically started up when the assigned Datacenter is initialized or not.
    • powerModel

      protected PowerModelHost powerModel
    • idleShutdownDeadline

      protected double idleShutdownDeadline
    • cpuUtilizationStats

      protected HostResourceStats cpuUtilizationStats
    • resources

      protected List<ResourceManageable> resources
      See Also:
    • provisioners

      protected List<ResourceProvisioner> provisioners
    • lazySuitabilityEvaluation

      protected boolean lazySuitabilityEvaluation

      It's enabled by default.

    • datacenter

      protected Datacenter datacenter
  • Constructor Details

    • HostAbstract

      public HostAbstract(ResourceProvisioner ramProvisioner, ResourceProvisioner bwProvisioner, long storage, List<Pe> peList)
    • HostAbstract

      public HostAbstract(long ram, long bw, long storage, List<Pe> peList)
    • HostAbstract

      protected HostAbstract(long ram, long bw, @NonNull @NonNull HarddriveStorage storage, List<Pe> peList)
    • HostAbstract

      public HostAbstract(List<Pe> peList)
    • HostAbstract

      public HostAbstract(List<Pe> peList, boolean activate)
    • HostAbstract

      protected HostAbstract(long ram, long bw, @NonNull @NonNull HarddriveStorage storage, List<Pe> peList, boolean activate)
  • Method Details

    • setDefaultRamCapacity

      public static void setDefaultRamCapacity(long defaultCapacity)
      Sets the Default RAM capacity (in MB) for creating Hosts. This value is used when the RAM capacity is not given in a Host constructor.
    • setDefaultBwCapacity

      public static void setDefaultBwCapacity(long defaultCapacity)
      Sets the Default Bandwidth capacity (in Mbps) for creating Hosts. This value is used when the BW capacity is not given in a Host constructor.
    • setDefaultStorageCapacity

      public static void setDefaultStorageCapacity(long defaultCapacity)
      Sets the Default Storage capacity (in MB) for creating Hosts. This value is used when the Storage capacity is not given in a Host constructor.
    • updateProcessing

      public double updateProcessing(double currentTime)
      Description copied from interface: Host
      Updates the processing of VMs running on this Host, that makes the processing of Cloudlets inside such VMs to be updated.
      Specified by:
      updateProcessing in interface Host
      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_VALUE if there is no next Cloudlet to execute
    • updateVmProcessing

      protected double updateVmProcessing(Vm vm, double currentTime, double nextSimulationDelay)
    • createVm

      public HostSuitability createVm(Vm vm)
      Description copied from interface: Host
      Try to allocate resources to a new VM in the Host.
      Specified by:
      createVm in interface Host
      Parameters:
      vm - Vm being started
      Returns:
      a HostSuitability to 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:
    • createTemporaryVm

      public HostSuitability createTemporaryVm(Vm vm)
      Description copied from interface: Host
      Try to allocate resources to a new temporary VM in the Host. The method is used only to book resources for a given VM. If Hosts are being chosen to migrate a set of VMs, when a Host is selected for a given VM, using this method: - the resources are reserved, - then, when the next Vm is selected for the same Host, the previous reserved resources were already reduced from the available amount. This way, if it was possible to place just one Vm into that Host, with the booking, no other VM will be selected to it.
      Specified by:
      createTemporaryVm in interface Host
      Parameters:
      vm - Vm being started
      Returns:
      a HostSuitability to indicate if the Vm was placed into the Host or not (if the Host doesn't have enough resources to allocate the Vm) TODO: https://github.com/cloudsimplus/cloudsimplus/issues/94
    • reallocateMigratingInVms

      public void reallocateMigratingInVms()
      Description copied from interface: Host
      Reallocate VMs migrating into this Host. Gets the VMs in the migrating-in queue and allocates them on the Host.
      Specified by:
      reallocateMigratingInVms in interface Host
    • isSuitableForVm

      public boolean isSuitableForVm(Vm vm)
      Description copied from interface: Host
      Checks if the Host is suitable for a Vm (if it has enough resources to meet the Vm requirements) and the Host has not failed.
      Specified by:
      isSuitableForVm in interface Host
      Parameters:
      vm - the Vm to check
      Returns:
      true if is suitable for Vm, false otherwise
      See Also:
    • getSuitabilityFor

      public HostSuitability getSuitabilityFor(Vm vm)
      Description copied from interface: Host
      Checks if the host is suitable for a Vm (if it has enough resources to meet the Vm requirements) and the Host has not failed, providing fine-grained information about the suitability of each Host resource.
      Specified by:
      getSuitabilityFor in interface Host
      Parameters:
      vm - the Vm to check
      Returns:
      a HostSuitability object indicating the Host's resources that are suitable or not for the given Vm.
      See Also:
    • hasEverStarted

      public boolean hasEverStarted()
      Specified by:
      hasEverStarted in interface Host
      Returns:
      true if the Host has ever started sometime, i.e., if it was active sometime in the simulation execution; false otherwise.
    • setActive

      public final Host setActive(boolean activate)
      Description copied from interface: Host
      Requests the Host to be powered on or off. If there is no ExecDelayable.getStartupDelay() or ExecDelayable.getShutDownDelay() (which is the default), those operations will happen immediately.

      If the Host is set to be powered off while it has VMs running, it is simulated a scheduled shutdown, so that those VMs will finish, but new ones won't be submitted to this Host.

      Specified by:
      setActive in interface Host
      Parameters:
      activate - true to power on, false to power off
      Returns:
      this Host instance
      See Also:
    • shutdown

      public void shutdown()
      Description copied from interface: ExecDelayable
      Sends a request to shut down the entity.
      Specified by:
      shutdown in interface ExecDelayable
      Specified by:
      shutdown in interface Host
      See Also:
    • processActivation

      public void processActivation(boolean activate)
      Process an event for actually powering the Host on or off after any defined startup/shutdown delay (if some delay is set).
      Parameters:
      activate - true to start the Host up, false to shut it down
      See Also:
    • destroyVm

      public void destroyVm(Vm vm)
      Destroys a Vm running in the Host and removes it from the getVmList(). If the Vm was not created yet, this method has no effect.
      Parameters:
      vm - the VM to be destroyed
    • destroyTemporaryVm

      public void destroyTemporaryVm(Vm vm)
      Destroys a temporary Vm created into the Host to book resources.
      Parameters:
      vm - the Vm to be destroyed
      See Also:
    • destroyVmInternal

      public void destroyVmInternal(@NonNull @NonNull Vm vm)
    • deallocateResourcesOfVm

      protected void deallocateResourcesOfVm(Vm vm)
      Deallocate all resources that a Vm was using.
      Parameters:
      vm - the VM to deallocate resources from
    • destroyAllVms

      public void destroyAllVms()
      Destroys all Vm's running in the Host and removes them from the getVmList().
    • addOnStartupListener

      public Host addOnStartupListener(@NonNull @NonNull EventListener<HostEventInfo> listener)
      Description copied from interface: Host
      Adds a listener object that will be notified every time the host is powered on.
      Specified by:
      addOnStartupListener in interface Host
      Parameters:
      listener - the Listener to add
      Returns:
      this Host
    • removeOnStartupListener

      public boolean removeOnStartupListener(@NonNull @NonNull EventListener<HostEventInfo> listener)
      Description copied from interface: Host
      Removes a Listener object from the OnStartup List.
      Specified by:
      removeOnStartupListener in interface Host
      Parameters:
      listener - the Listener to remove
      Returns:
      true if the Listener was removed, false otherwise
    • addOnShutdownListener

      public Host addOnShutdownListener(@NonNull @NonNull EventListener<HostEventInfo> listener)
      Description copied from interface: Host
      Adds a listener object that will be notified every time the host is powered off.
      Specified by:
      addOnShutdownListener in interface Host
      Parameters:
      listener - the Listener to add
      Returns:
      this Host
    • removeOnShutdownListener

      public boolean removeOnShutdownListener(@NonNull @NonNull EventListener<HostEventInfo> listener)
      Description copied from interface: Host
      Removes a Listener object from the OnShutdown List.
      Specified by:
      removeOnShutdownListener in interface Host
      Parameters:
      listener - the Listener to remove
      Returns:
      true if the Listener was removed, false otherwise
    • removeOnUpdateProcessingListener

      public boolean removeOnUpdateProcessingListener(@NonNull @NonNull EventListener<HostUpdatesVmsProcessingEventInfo> listener)
      Description copied from interface: Host
      Removes a Listener object from the OnUpdateProcessing List.
      Specified by:
      removeOnUpdateProcessingListener in interface Host
      Parameters:
      listener - the listener to remove
      Returns:
      true if the listener was found and removed, false otherwise
      See Also:
    • addOnUpdateProcessingListener

      public Host addOnUpdateProcessingListener(@NonNull @NonNull EventListener<HostUpdatesVmsProcessingEventInfo> listener)
      Description copied from interface: Host
      Adds a listener object that will be notified every time the host updates the processing of all its VMs.
      Specified by:
      addOnUpdateProcessingListener in interface Host
      Parameters:
      listener - the OnUpdateProcessingListener to add
      Returns:
      this Host
      See Also:
    • getPesNumber

      public long getPesNumber()
      Specified by:
      getPesNumber in interface Machine<FileStorage>
      Returns:
      the overall number of Pes the machine has, that include PEs of all statuses, including failed PEs.
      See Also:
    • getAllocatedMipsForVm

      protected MipsShare getAllocatedMipsForVm(Vm vm)
      Gets the MIPS share of each Pe that is allocated to a given Vm.
      Parameters:
      vm - the Vm to get the MIPS share
      Returns:
      an array containing the MIPS amount from each Pe that is available to the Vm
    • getMips

      public double getMips()
      Specified by:
      getMips in interface Machine<FileStorage>
      Returns:
      the individual MIPS capacity of any machine's Pe, considering that all PEs have the same capacity.
    • getTotalMipsCapacity

      public double getTotalMipsCapacity()
      Specified by:
      getTotalMipsCapacity in interface Host
      Specified by:
      getTotalMipsCapacity in interface Machine<FileStorage>
      Returns:
      total MIPS capacity of Pes which are not Pe.Status.FAILED.
    • getTotalAvailableMips

      public double getTotalAvailableMips()
      Specified by:
      getTotalAvailableMips in interface Host
      Returns:
      the current total amount of available MIPS at the Host.
    • getTotalAllocatedMips

      public double getTotalAllocatedMips()
      Specified by:
      getTotalAllocatedMips in interface Host
      Returns:
      the total allocated MIPS at the Host.
    • getTotalAllocatedMipsForVm

      public double getTotalAllocatedMipsForVm(Vm vm)
      Description copied from interface: Host
      Returns the total allocated MIPS for a VM across all its PEs.
      Specified by:
      getTotalAllocatedMipsForVm in interface Host
      Parameters:
      vm - the Vm to get its total allocated MIPS
      Returns:
      the total allocated MIPS for a VM across all its PEs
    • getBw

      public Resource getBw()
      Specified by:
      getBw in interface Machine<FileStorage>
      Returns:
      a resource representing the machine bandwidth (bw) in Megabits/s.
    • getRam

      public Resource getRam()
      Specified by:
      getRam in interface Machine<FileStorage>
      Returns:
      a resource representing the machine memory in Megabytes.
    • getStorage

      public FileStorage getStorage()
      Specified by:
      getStorage in interface Machine<FileStorage>
      Returns:
      the storage device of the machine with capacity in Megabytes.
    • setRamProvisioner

      public final Host setRamProvisioner(ResourceProvisioner ramProvisioner)
      Description copied from interface: Host
      Sets the ram provisioner with capacity in Megabytes.
      Specified by:
      setRamProvisioner in interface Host
      Parameters:
      ramProvisioner - the new ram provisioner
    • setBwProvisioner

      public final Host setBwProvisioner(ResourceProvisioner bwProvisioner)
      Description copied from interface: Host
      Sets the bandwidth (BW) provisioner with capacity in Megabits/s.
      Specified by:
      setBwProvisioner in interface Host
      Parameters:
      bwProvisioner - the new bw provisioner
    • setVmScheduler

      public final Host setVmScheduler(VmScheduler vmScheduler)
      Description copied from interface: Host
      Sets the policy for allocation of host Pes to VMs to schedule VM execution. The host also sets itself to the given scheduler. It also sets the Host itself to the given scheduler.
      Specified by:
      setVmScheduler in interface Host
      Parameters:
      vmScheduler - the vm scheduler to set
      Returns:
      this Host
    • onStart

      public void onStart(double startTime)
      Description copied from class: StartableAbstract
      Notifies when the entity is actually started.
      Specified by:
      onStart in class StartableAbstract
      Parameters:
      startTime - the new start time
    • onFinish

      protected void onFinish(double time)
      Description copied from class: StartableAbstract
      Notifies when the entity is actually finished.
      Specified by:
      onFinish in class StartableAbstract
      Parameters:
      time - the new finish time
    • isFinished

      public boolean isFinished()
      Specified by:
      isFinished in interface Host
      Specified by:
      isFinished in interface Startable
      Returns:
      true if this entity has finished execution; false otherwise
      See Also:
    • getUpTime

      public double getUpTime()
      Specified by:
      getUpTime in interface Host
      Returns:
      the elapsed time (in seconds) since the last power on.
      See Also:
    • getTotalUpTime

      public double getTotalUpTime()
      Description copied from interface: Host
      Returns the total time (in seconds) the Host stayed active (powered on). Since the Host can be powered on and off according to the demand, this method returns the sum of all intervals the Host was active.
      Specified by:
      getTotalUpTime in interface Host
      Returns:
      the total time (in seconds) the Host stayed active (powered on)
      See Also:
    • getUpTimeHours

      public double getUpTimeHours()
      Specified by:
      getUpTimeHours in interface Host
      Returns:
      the elapsed time (in hours) since the last power on.
      See Also:
    • getTotalUpTimeHours

      public double getTotalUpTimeHours()
      Description copied from interface: Host
      Returns the total time (in hours) the Host stayed active (powered on). Since the Host can be powered on and off according to the demand, this method returns the sum of all intervals the Host was active.
      Specified by:
      getTotalUpTimeHours in interface Host
      Returns:
      the total time (in hours) the Host stayed active (powered on)
      See Also:
    • setPeList

      protected void setPeList(List<Pe> peList)
      Sets the Pe list.
      Parameters:
      peList - the new Pe list
    • getVmList

      public <T extends Vm> List<T> getVmList()
      Description copied from interface: Host
      Gets a list of VMs currently assigned to the Host.
      Specified by:
      getVmList in interface Host
      Type Parameters:
      T - The generic type
      Returns:
      the read-only current VM list
    • getVmCreatedList

      public <T extends Vm> List<T> getVmCreatedList()
      Description copied from interface: Host
      Gets a read-only list of all VMs that have been created into the Host during the entire simulation. This way, this method returns a historic list of created VMs, including those already destroyed.
      Specified by:
      getVmCreatedList in interface Host
      Type Parameters:
      T - The Vm generic type
      Returns:
      the read-only created VM historic list
    • addVmToList

      protected void addVmToList(@NonNull @NonNull Vm vm)
    • addVmToCreatedList

      protected void addVmToCreatedList(@NonNull @NonNull Vm vm)
    • setFailed

      public final boolean setFailed(boolean failed)
      Description copied from interface: Host
      Sets the Host state to "failed" or "working".
      Specified by:
      setFailed in interface Host
      Parameters:
      failed - true to set the Host to "failed", false to set to "working"
      Returns:
      true if the Host status was changed, false otherwise
    • setPeStatus

      public final void setPeStatus(List<Pe> peList, Pe.Status newStatus)
      Sets the status of a given (sub)list of Pes to a new status.
      Parameters:
      peList - the (sub)list of Pes to change the status
      newStatus - the new status
    • incFailedPesNumber

      protected void incFailedPesNumber(int inc)
      Updates the number of failed (and working) Pes, decreasing it if a negative number is given, or increasing otherwise.
      Parameters:
      inc - the value to sum (positive or negative) to the number of busy PEs
    • incFreePesNumber

      protected void incFreePesNumber(int inc)
      Updates the number of free Pes, decreasing it if a negative number is given, or increasing otherwise.
      Parameters:
      inc - the value to sum (positive or negative) to the number of busy PEs
    • incBusyPesNumber

      protected void incBusyPesNumber(int inc)
      Updates the number of busy Pes, decreasing it if a negative number is given, or increasing otherwise.
      Parameters:
      inc - the value to sum (positive or negative) to the number of busy PEs
    • getVmsMigratingIn

      public <T extends Vm> Set<T> getVmsMigratingIn()
      Description copied from interface: Host
      Gets the list of VMs migrating into this host.
      Specified by:
      getVmsMigratingIn in interface Host
      Type Parameters:
      T - the generic type
      Returns:
      the VMs migrating in
    • hasMigratingVms

      public boolean hasMigratingVms()
      Specified by:
      hasMigratingVms in interface Host
      Returns:
      true if there is any VM migrating in or out this host; false otherwise.
    • addMigratingInVm

      public boolean addMigratingInVm(Vm vm)
      Description copied from interface: Host
      Try to add a Vm migrating into the current Host if there are enough resources for it. In this case, the resources are allocated and the Vm is added to the Host.getVmsMigratingIn() List. Otherwise, the Vm is not added.
      Specified by:
      addMigratingInVm in interface Host
      Parameters:
      vm - the Vm to add to the migrating-in list
      Returns:
      true if the Vm was migrated in; false if the Host doesn't have enough resources to place the Vm
    • removeMigratingInVm

      public void removeMigratingInVm(@NonNull @NonNull Vm vm)
      Description copied from interface: Host
      Removes a VM migrating into this Host from the migrating-in list, so that the VM can be actually placed into the Host and the migration process finished.
      Specified by:
      removeMigratingInVm in interface Host
      Parameters:
      vm - the Vm to remove
    • getVmsMigratingOut

      public Set<Vm> getVmsMigratingOut()
      Specified by:
      getVmsMigratingOut in interface Host
      Returns:
      a read-only list of VMs migrating out from the Host.
    • addVmMigratingOut

      public boolean addVmMigratingOut(@NonNull @NonNull Vm vm)
      Description copied from interface: Host
      Adds a Vm to the list of VMs migrating out this Host.
      Specified by:
      addVmMigratingOut in interface Host
      Parameters:
      vm - the Vm to be added
      Returns:
      true if the Vm was added, false otherwise
    • removeVmMigratingOut

      public boolean removeVmMigratingOut(@NonNull @NonNull Vm vm)
      Description copied from interface: Host
      Removes a Vm from the list of VMs migrating out this Host.
      Specified by:
      removeVmMigratingOut in interface Host
      Parameters:
      vm - the Vm to be removed
      Returns:
      true if the Vm was removed, false otherwise
    • setDatacenter

      public final void setDatacenter(@NonNull @NonNull Datacenter datacenter)
      Description copied from interface: Host
      Sets the Datacenter where the host is placed.
      Specified by:
      setDatacenter in interface Host
      Parameters:
      datacenter - the new data center to move the host
    • getAvailableStorage

      public long getAvailableStorage()
      Specified by:
      getAvailableStorage in interface Host
      Returns:
      the total free storage available at the Host in Megabytes.
    • getBusyPesPercent

      public double getBusyPesPercent()
      Specified by:
      getBusyPesPercent in interface Host
      Returns:
      the current percentage (from 0..1) of used (busy) Pes, according to the total number of PEs.
      See Also:
    • getBusyPesPercent

      public double getBusyPesPercent(boolean hundredScale)
      Description copied from interface: Host
      Gets the current percentage of used (busy) Pes, according to the total number of PEs.
      Specified by:
      getBusyPesPercent in interface Host
      Parameters:
      hundredScale - true for getting the return in the 0..100 scale; false for the 0..1 scale.
      Returns:
      the percentage of busy PEs in the defined scale (according to the hundredScale parameter).
      See Also:
    • getResources

      public List<ResourceManageable> getResources()
      Specified by:
      getResources in interface Resourceful
      Returns:
      a read-only list of resources the machine has.
      See Also:
    • getProvisioner

      public ResourceProvisioner getProvisioner(Class<? extends ResourceManageable> resourceClass)
      Description copied from interface: Host
      Gets the ResourceProvisioners that manages a Host's resource such as Ram, Bandwidth and Pe.
      Specified by:
      getProvisioner in interface Host
      Parameters:
      resourceClass - the class of the resource to get its provisioner
      Returns:
      the ResourceProvisioner for the given resource class
    • getWorkingPeList

      public List<Pe> getWorkingPeList()
      Specified by:
      getWorkingPeList in interface Host
      Returns:
      the list of working (non-failed) Pes of the Host.
    • getBusyPeList

      public List<Pe> getBusyPeList()
      Specified by:
      getBusyPeList in interface Host
      Returns:
      the list of Pes of the Host that are Pe.Status.BUSY.
    • getFreePeList

      public List<Pe> getFreePeList()
      Specified by:
      getFreePeList in interface Host
      Returns:
      the list of free (non-failed) Pes of the Host.
    • getCpuPercentUtilization

      public double getCpuPercentUtilization()
      Specified by:
      getCpuPercentUtilization in interface Host
      Returns:
      the current percentage (between [0 and 1]) of CPU capacity (MIPS) used by all running VMs. It represents the actual percentage of MIPS allocated.
    • getCpuPercentRequested

      public double getCpuPercentRequested()
      Specified by:
      getCpuPercentRequested in interface Host
      Returns:
      the percentage (between [0 and 1]) of CPU capacity (MIPS) requested by all running VMs at the current time. It represents the percentage of MIPS requested, which may be higher than the percentage used (allocated) due to lack of capacity.
    • getCpuMipsUtilization

      public double getCpuMipsUtilization()
      Specified by:
      getCpuMipsUtilization in interface Host
      Returns:
      the current total utilization of CPU in MIPS, considering the usage of all its PEs.
    • getRamUtilization

      public long getRamUtilization()
      Specified by:
      getRamUtilization in interface Host
      Returns:
      the current utilization of memory (in Megabytes).
    • getBwUtilization

      public long getBwUtilization()
      Specified by:
      getBwUtilization in interface Host
      Returns:
      the current utilization of bw (in Megabits/s).
    • enableUtilizationStats

      public void enableUtilizationStats()
      Description copied from interface: Host
      Enables the data collection and computation of utilization statistics. It iterates over all existing VMs, enabling the statistics computation on everyone. Keep in mind that when a Host is created, it has no VMs. Therefore, you need to call this method for every VM if you are enabling the computation before the simulation starts and VM placement is performed.
      Specified by:
      enableUtilizationStats in interface Host
      Specified by:
      enableUtilizationStats in interface ResourceStatsComputer<HostResourceStats>
      See Also:
    • setPowerModel

      public final PowerAware<PowerModelHost> setPowerModel(PowerModelHost powerModel)
      Description copied from interface: Host
      Sets the PowerModelHost used by the Host to define how it consumes power. A Host just provides power usage data if a PowerModel is set.
      Specified by:
      setPowerModel in interface Host
      Specified by:
      setPowerModel in interface PowerAware<PowerModelHost>
      Parameters:
      powerModel - the PowerModelHost to set
    • getFinishedVms

      public List<Vm> getFinishedVms()
      Specified by:
      getFinishedVms in interface Host
      Returns:
      the List of VMs that have finished executing.
    • getStateHistory

      public List<HostStateHistoryEntry> getStateHistory()
      Specified by:
      getStateHistory in interface Host
      Returns:
      a read-only Host state history. This List is just populated if Host.isStateHistoryEnabled()
      See Also:
    • getMigratableVms

      public List<Vm> getMigratableVms()
      Specified by:
      getMigratableVms in interface Host
      Returns:
      the list of VMs that can be migrated from the Host.