Record Class DistributedMap.MapStatistics
java.lang.Object
java.lang.Record
com.loomcache.server.datastructures.DistributedMap.MapStatistics
- Record Components:
totalPuts- total number of put operationstotalHits- total number of cache hitstotalMisses- total number of cache missestotalEvictions- total number of entries evictedhitRate- hit rate as a ratio [0.0, 1.0]
- Enclosing class:
DistributedMap<K,V>
public static record DistributedMap.MapStatistics(long totalPuts, long totalHits, long totalMisses, long totalEvictions, double hitRate)
extends Record
Statistics snapshot of map operations and performance.
-
Constructor Summary
ConstructorsConstructorDescriptionMapStatistics(long totalPuts, long totalHits, long totalMisses, long totalEvictions, double hitRate) Creates an instance of aMapStatisticsrecord 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.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalEvictionsrecord component.longReturns the value of thetotalHitsrecord component.longReturns the value of thetotalMissesrecord component.longReturns the value of thetotalPutsrecord component.
-
Constructor Details
-
MapStatistics
public MapStatistics(long totalPuts, long totalHits, long totalMisses, long totalEvictions, double hitRate) Creates an instance of aMapStatisticsrecord class.- Parameters:
totalPuts- the value for thetotalPutsrecord componenttotalHits- the value for thetotalHitsrecord componenttotalMisses- the value for thetotalMissesrecord componenttotalEvictions- the value for thetotalEvictionsrecord componenthitRate- the value for thehitRaterecord 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. -
totalPuts
-
totalHits
-
totalMisses
public long totalMisses()Returns the value of thetotalMissesrecord component.- Returns:
- the value of the
totalMissesrecord component
-
totalEvictions
public long totalEvictions()Returns the value of thetotalEvictionsrecord component.- Returns:
- the value of the
totalEvictionsrecord component
-
hitRate
-