Record Class MemoryManager.MemoryStats

java.lang.Object
java.lang.Record
com.loomcache.server.cache.MemoryManager.MemoryStats
Enclosing class:
MemoryManager

public static record MemoryManager.MemoryStats(long usedBytes, long maxBytes, double utilizationPercent, long cacheBytes, long nonCacheBytes) extends Record
Memory usage statistics.
  • Constructor Details

    • MemoryStats

      public MemoryStats(long usedBytes, long maxBytes, double utilizationPercent, long cacheBytes, long nonCacheBytes)
      Creates an instance of a MemoryStats record class.
      Parameters:
      usedBytes - the value for the usedBytes record component
      maxBytes - the value for the maxBytes record component
      utilizationPercent - the value for the utilizationPercent record component
      cacheBytes - the value for the cacheBytes record component
      nonCacheBytes - the value for the nonCacheBytes record component
  • Method Details

    • aboveSoftLimit

      public boolean aboveSoftLimit(MemoryManager.MemoryThreshold threshold)
    • aboveHardLimit

      public boolean aboveHardLimit(MemoryManager.MemoryThreshold threshold)
    • 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.
    • usedBytes

      public long usedBytes()
      Returns the value of the usedBytes record component.
      Returns:
      the value of the usedBytes record component
    • maxBytes

      public long maxBytes()
      Returns the value of the maxBytes record component.
      Returns:
      the value of the maxBytes record component
    • utilizationPercent

      public double utilizationPercent()
      Returns the value of the utilizationPercent record component.
      Returns:
      the value of the utilizationPercent record component
    • cacheBytes

      public long cacheBytes()
      Returns the value of the cacheBytes record component.
      Returns:
      the value of the cacheBytes record component
    • nonCacheBytes

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