Record Class TurSystemInfoBean.MemoryInfo

java.lang.Object
java.lang.Record
com.viglet.turing.api.system.TurSystemInfoBean.MemoryInfo
Enclosing class:
TurSystemInfoBean

public static record TurSystemInfoBean.MemoryInfo(long maxMemory, long totalMemory, long usedMemory, long freeMemory, long totalPhysicalMemory, long freePhysicalMemory, long totalSwap, long freeSwap) extends Record
Since:
2026.1.14
Author:
Alexandre Oliveira
  • Constructor Summary

    Constructors
    Constructor
    Description
    MemoryInfo(long maxMemory, long totalMemory, long usedMemory, long freeMemory, long totalPhysicalMemory, long freePhysicalMemory, long totalSwap, long freeSwap)
    Creates an instance of a MemoryInfo record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the value of the freeMemory record component.
    long
    Returns the value of the freePhysicalMemory record component.
    long
    Returns the value of the freeSwap record component.
    final int
    Returns a hash code value for this object.
    long
    Returns the value of the maxMemory record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the totalMemory record component.
    long
    Returns the value of the totalPhysicalMemory record component.
    long
    Returns the value of the totalSwap record component.
    long
    Returns the value of the usedMemory record component.

    Methods inherited from class Object

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

    • MemoryInfo

      public MemoryInfo(long maxMemory, long totalMemory, long usedMemory, long freeMemory, long totalPhysicalMemory, long freePhysicalMemory, long totalSwap, long freeSwap)
      Creates an instance of a MemoryInfo record class.
      Parameters:
      maxMemory - the value for the maxMemory record component
      totalMemory - the value for the totalMemory record component
      usedMemory - the value for the usedMemory record component
      freeMemory - the value for the freeMemory record component
      totalPhysicalMemory - the value for the totalPhysicalMemory record component
      freePhysicalMemory - the value for the freePhysicalMemory record component
      totalSwap - the value for the totalSwap record component
      freeSwap - the value for the freeSwap record component
  • Method Details

    • 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. 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.
    • maxMemory

      public long maxMemory()
      Returns the value of the maxMemory record component.
      Returns:
      the value of the maxMemory record component
    • totalMemory

      public long totalMemory()
      Returns the value of the totalMemory record component.
      Returns:
      the value of the totalMemory record component
    • usedMemory

      public long usedMemory()
      Returns the value of the usedMemory record component.
      Returns:
      the value of the usedMemory record component
    • freeMemory

      public long freeMemory()
      Returns the value of the freeMemory record component.
      Returns:
      the value of the freeMemory record component
    • totalPhysicalMemory

      public long totalPhysicalMemory()
      Returns the value of the totalPhysicalMemory record component.
      Returns:
      the value of the totalPhysicalMemory record component
    • freePhysicalMemory

      public long freePhysicalMemory()
      Returns the value of the freePhysicalMemory record component.
      Returns:
      the value of the freePhysicalMemory record component
    • totalSwap

      public long totalSwap()
      Returns the value of the totalSwap record component.
      Returns:
      the value of the totalSwap record component
    • freeSwap

      public long freeSwap()
      Returns the value of the freeSwap record component.
      Returns:
      the value of the freeSwap record component