Record Class QueryExecutionCache.CacheStats
java.lang.Object
java.lang.Record
com.loomcache.server.query.QueryExecutionCache.CacheStats
- Enclosing class:
QueryExecutionCache
public static record QueryExecutionCache.CacheStats(long hits, long misses, double hitRate, int size)
extends Record
Statistics about cache performance.
-
Constructor Summary
ConstructorsConstructorDescriptionCacheStats(long hits, long misses, double hitRate, int size) Creates an instance of aCacheStatsrecord 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.doublehitRate()Returns the value of thehitRaterecord component.longhits()Returns the value of thehitsrecord component.longmisses()Returns the value of themissesrecord component.intsize()Returns the value of thesizerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CacheStats
public CacheStats(long hits, long misses, double hitRate, int size) Creates an instance of aCacheStatsrecord class.- Parameters:
hits- the value for thehitsrecord componentmisses- the value for themissesrecord componenthitRate- the value for thehitRaterecord componentsize- the value for thesizerecord component
-
-
Method Details
-
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. -
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
-
hitRate
public double hitRate()Returns the value of thehitRaterecord component.- Returns:
- the value of the
hitRaterecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-