Record Class NearCache.NearCacheStats
java.lang.Object
java.lang.Record
com.loomcache.client.cache.NearCache.NearCacheStats
public static record NearCache.NearCacheStats(long size, long maxSize, long hits, long misses, long evictions, long loads, double hitRate)
extends Record
Near cache statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionNearCacheStats(long size, long maxSize, long hits, long misses, long evictions, long loads, double hitRate) Creates an instance of aNearCacheStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of theevictionsrecord component.final inthashCode()Returns a hash code value for this object.doublehitRate()Returns the value of thehitRaterecord component.doublehitRatio()Alias for hitRate for backward compatibility.longhits()Returns the value of thehitsrecord component.longloads()Returns the value of theloadsrecord component.longmaxSize()Returns the value of themaxSizerecord component.longmisses()Returns the value of themissesrecord component.longsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NearCacheStats
public NearCacheStats(long size, long maxSize, long hits, long misses, long evictions, long loads, double hitRate) Creates an instance of aNearCacheStatsrecord class.- Parameters:
size- the value for thesizerecord componentmaxSize- the value for themaxSizerecord componenthits- the value for thehitsrecord componentmisses- the value for themissesrecord componentevictions- the value for theevictionsrecord componentloads- the value for theloadsrecord componenthitRate- the value for thehitRaterecord component
-
-
Method Details
-
hitRatio
public double hitRatio()Alias for hitRate for backward compatibility. -
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. -
size
public long size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
maxSize
public long maxSize()Returns the value of themaxSizerecord component.- Returns:
- the value of the
maxSizerecord component
-
hits
public long hits()Returns the value of thehitsrecord component.- Returns:
- the value of the
hitsrecord component
-
misses
public long misses()Returns the value of themissesrecord component.- Returns:
- the value of the
missesrecord component
-
evictions
public long evictions()Returns the value of theevictionsrecord component.- Returns:
- the value of the
evictionsrecord component
-
loads
public long loads()Returns the value of theloadsrecord component.- Returns:
- the value of the
loadsrecord component
-
hitRate
public double hitRate()Returns the value of thehitRaterecord component.- Returns:
- the value of the
hitRaterecord component
-