Record Class JvmMemoryPressure.Reading

java.lang.Object
java.lang.Record
com.kingsrook.qqq.backend.core.health.JvmMemoryPressure.Reading
Enclosing class:
JvmMemoryPressure

public static record JvmMemoryPressure.Reading(Instant at, Double heapAfterGcPercent, double gcTimePercent, boolean pressured, Instant pressuredSince) extends Record
One evaluation.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Reading(Instant at, Double heapAfterGcPercent, double gcTimePercent, boolean pressured, Instant pressuredSince)
    Creates an instance of a Reading record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    at()
    Returns the value of the at record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the gcTimePercent record component.
    final int
    Returns a hash code value for this object.
    Returns the value of the heapAfterGcPercent record component.
    boolean
    Returns the value of the pressured record component.
    How long pressure has lasted at this reading; zero when not pressured.
    Returns the value of the pressuredSince record component.
    final String
    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

    • Reading

      public Reading(Instant at, Double heapAfterGcPercent, double gcTimePercent, boolean pressured, Instant pressuredSince)
      Creates an instance of a Reading record class.
      Parameters:
      at - the value for the at record component
      heapAfterGcPercent - the value for the heapAfterGcPercent record component
      gcTimePercent - the value for the gcTimePercent record component
      pressured - the value for the pressured record component
      pressuredSince - the value for the pressuredSince record component
  • Method Details

    • pressuredFor

      public Duration pressuredFor()
      How long pressure has lasted at this reading; zero when not pressured.
    • toString

      public final 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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • at

      public Instant at()
      Returns the value of the at record component.
      Returns:
      the value of the at record component
    • heapAfterGcPercent

      public Double heapAfterGcPercent()
      Returns the value of the heapAfterGcPercent record component.
      Returns:
      the value of the heapAfterGcPercent record component
    • gcTimePercent

      public double gcTimePercent()
      Returns the value of the gcTimePercent record component.
      Returns:
      the value of the gcTimePercent record component
    • pressured

      public boolean pressured()
      Returns the value of the pressured record component.
      Returns:
      the value of the pressured record component
    • pressuredSince

      public Instant pressuredSince()
      Returns the value of the pressuredSince record component.
      Returns:
      the value of the pressuredSince record component