Record Class HostStateHistoryEntry

java.lang.Object
java.lang.Record
org.cloudsimplus.hosts.HostStateHistoryEntry
Record Components:
time - the time the data in this history entry is related to (in seconds)
allocatedMips - the total MIPS allocated from all PEs of the Host, to running VMs, at the recorded time
requestedMips - the total MIPS requested by running VMs to all PEs of the Host at the recorded time
active - if the Host is active at the given time

public record HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active) extends Record
Keeps historic CPU utilization data about a Host for a given time.
Since:
CloudSim Toolkit 2.1.2
Author:
Anton Beloglazov
  • Constructor Summary

    Constructors
    Constructor
    Description
    HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active)
    Creates an instance of a HostStateHistoryEntry record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if the Host is/was active at the recorded time.
    double
    Returns the value of the allocatedMips record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
     
    double
    Returns the value of the requestedMips record component.
    double
    Returns the value of the time record component.
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • HostStateHistoryEntry

      public HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active)
      Creates an instance of a HostStateHistoryEntry record class.
      Parameters:
      time - the value for the time record component
      allocatedMips - the value for the allocatedMips record component
      requestedMips - the value for the requestedMips record component
      active - the value for the active record component
  • Method Details

    • time

      public double time()
      Returns the value of the time record component.
      Returns:
      the value of the time record component
    • allocatedMips

      public double allocatedMips()
      Returns the value of the allocatedMips record component.
      Returns:
      the value of the allocatedMips record component
    • requestedMips

      public double requestedMips()
      Returns the value of the requestedMips record component.
      Returns:
      the value of the requestedMips record component
    • percentUsage

      public double percentUsage()
      Returns:
      the percentage (in scale from 0 to 1) of allocated MIPS from the total requested.
    • active

      public boolean active()
      Checks if the Host is/was active at the recorded time.
      Returns:
      true if active, false otherwise
    • toString

      public String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.