Package app.ductape.sdk.cache
Record Class CacheManager.InternalCacheStats
java.lang.Object
java.lang.Record
app.ductape.sdk.cache.CacheManager.InternalCacheStats
- Enclosing class:
- CacheManager
public static record CacheManager.InternalCacheStats(int size, int maxSize, int utilizationPercent, boolean redisAvailable)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionInternalCacheStats(int size, int maxSize, int utilizationPercent, boolean redisAvailable) Creates an instance of aInternalCacheStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intmaxSize()Returns the value of themaxSizerecord component.booleanReturns the value of theredisAvailablerecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of theutilizationPercentrecord component.
-
Constructor Details
-
InternalCacheStats
public InternalCacheStats(int size, int maxSize, int utilizationPercent, boolean redisAvailable) Creates an instance of aInternalCacheStatsrecord class.- Parameters:
size- the value for thesizerecord componentmaxSize- the value for themaxSizerecord componentutilizationPercent- the value for theutilizationPercentrecord componentredisAvailable- the value for theredisAvailablerecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
maxSize
public int maxSize()Returns the value of themaxSizerecord component.- Returns:
- the value of the
maxSizerecord component
-
utilizationPercent
public int utilizationPercent()Returns the value of theutilizationPercentrecord component.- Returns:
- the value of the
utilizationPercentrecord component
-
redisAvailable
public boolean redisAvailable()Returns the value of theredisAvailablerecord component.- Returns:
- the value of the
redisAvailablerecord component
-