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 Summary
ConstructorsConstructorDescriptionMemoryStats(long usedBytes, long maxBytes, double utilizationPercent, long cacheBytes, long nonCacheBytes) Creates an instance of aMemoryStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanaboveHardLimit(MemoryManager.MemoryThreshold threshold) booleanaboveSoftLimit(MemoryManager.MemoryThreshold threshold) longReturns the value of thecacheBytesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longmaxBytes()Returns the value of themaxBytesrecord component.longReturns the value of thenonCacheBytesrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theusedBytesrecord component.doubleReturns the value of theutilizationPercentrecord component.
-
Constructor Details
-
MemoryStats
public MemoryStats(long usedBytes, long maxBytes, double utilizationPercent, long cacheBytes, long nonCacheBytes) Creates an instance of aMemoryStatsrecord class.- Parameters:
usedBytes- the value for theusedBytesrecord componentmaxBytes- the value for themaxBytesrecord componentutilizationPercent- the value for theutilizationPercentrecord componentcacheBytes- the value for thecacheBytesrecord componentnonCacheBytes- the value for thenonCacheBytesrecord component
-
-
Method Details
-
aboveSoftLimit
-
aboveHardLimit
-
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. -
usedBytes
public long usedBytes()Returns the value of theusedBytesrecord component.- Returns:
- the value of the
usedBytesrecord component
-
maxBytes
public long maxBytes()Returns the value of themaxBytesrecord component.- Returns:
- the value of the
maxBytesrecord component
-
utilizationPercent
public double utilizationPercent()Returns the value of theutilizationPercentrecord component.- Returns:
- the value of the
utilizationPercentrecord component
-
cacheBytes
public long cacheBytes()Returns the value of thecacheBytesrecord component.- Returns:
- the value of the
cacheBytesrecord component
-
nonCacheBytes
public long nonCacheBytes()Returns the value of thenonCacheBytesrecord component.- Returns:
- the value of the
nonCacheBytesrecord component
-