Record Class NearCache.CacheEfficiency
java.lang.Object
java.lang.Record
com.loomcache.client.cache.NearCache.CacheEfficiency
public static record NearCache.CacheEfficiency(double hitRate, double missRate, double evictionRate, double avgAccessTimeNs)
extends Record
Cache efficiency metrics.
-
Constructor Summary
ConstructorsConstructorDescriptionCacheEfficiency(double hitRate, double missRate, double evictionRate, double avgAccessTimeNs) Creates an instance of aCacheEfficiencyrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgAccessTimeNsrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theevictionRaterecord component.final inthashCode()Returns a hash code value for this object.doublehitRate()Returns the value of thehitRaterecord component.doublemissRate()Returns the value of themissRaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CacheEfficiency
public CacheEfficiency(double hitRate, double missRate, double evictionRate, double avgAccessTimeNs) Creates an instance of aCacheEfficiencyrecord class.- Parameters:
hitRate- the value for thehitRaterecord componentmissRate- the value for themissRaterecord componentevictionRate- the value for theevictionRaterecord componentavgAccessTimeNs- the value for theavgAccessTimeNsrecord 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. -
hitRate
public double hitRate()Returns the value of thehitRaterecord component.- Returns:
- the value of the
hitRaterecord component
-
missRate
public double missRate()Returns the value of themissRaterecord component.- Returns:
- the value of the
missRaterecord component
-
evictionRate
public double evictionRate()Returns the value of theevictionRaterecord component.- Returns:
- the value of the
evictionRaterecord component
-
avgAccessTimeNs
public double avgAccessTimeNs()Returns the value of theavgAccessTimeNsrecord component.- Returns:
- the value of the
avgAccessTimeNsrecord component
-