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 timerequestedMips- the total MIPS requested by running VMs to all PEs of the Host at the recorded timeactive- if the Host is active at the given time
-
Constructor Summary
ConstructorsConstructorDescriptionHostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active) Creates an instance of aHostStateHistoryEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanactive()Checks if the Host is/was active at the recorded time.doubleReturns the value of theallocatedMipsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doubledoubleReturns the value of therequestedMipsrecord component.doubletime()Returns the value of thetimerecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
HostStateHistoryEntry
public HostStateHistoryEntry(double time, double allocatedMips, double requestedMips, boolean active) Creates an instance of aHostStateHistoryEntryrecord class.- Parameters:
time- the value for thetimerecord componentallocatedMips- the value for theallocatedMipsrecord componentrequestedMips- the value for therequestedMipsrecord componentactive- the value for theactiverecord component
-
-
Method Details
-
time
-
allocatedMips
public double allocatedMips()Returns the value of theallocatedMipsrecord component.- Returns:
- the value of the
allocatedMipsrecord component
-
requestedMips
public double requestedMips()Returns the value of therequestedMipsrecord component.- Returns:
- the value of the
requestedMipsrecord 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
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes.
-