Record Class AccessTracker.AccessDistribution
java.lang.Object
java.lang.Record
com.loomcache.server.cache.AccessTracker.AccessDistribution
- Enclosing class:
AccessTracker
public static record AccessTracker.AccessDistribution(long uniqueKeys, long totalAccesses, long maxAccessCount, double avgAccessCount)
extends Record
Aggregate access distribution statistics.
-
Constructor Summary
ConstructorsConstructorDescriptionAccessDistribution(long uniqueKeys, long totalAccesses, long maxAccessCount, double avgAccessCount) Creates an instance of aAccessDistributionrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgAccessCountrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of themaxAccessCountrecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAccessesrecord component.longReturns the value of theuniqueKeysrecord component.
-
Constructor Details
-
AccessDistribution
public AccessDistribution(long uniqueKeys, long totalAccesses, long maxAccessCount, double avgAccessCount) Creates an instance of aAccessDistributionrecord class.- Parameters:
uniqueKeys- the value for theuniqueKeysrecord componenttotalAccesses- the value for thetotalAccessesrecord componentmaxAccessCount- the value for themaxAccessCountrecord componentavgAccessCount- the value for theavgAccessCountrecord 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. -
uniqueKeys
public long uniqueKeys()Returns the value of theuniqueKeysrecord component.- Returns:
- the value of the
uniqueKeysrecord component
-
totalAccesses
public long totalAccesses()Returns the value of thetotalAccessesrecord component.- Returns:
- the value of the
totalAccessesrecord component
-
maxAccessCount
public long maxAccessCount()Returns the value of themaxAccessCountrecord component.- Returns:
- the value of the
maxAccessCountrecord component
-
avgAccessCount
public double avgAccessCount()Returns the value of theavgAccessCountrecord component.- Returns:
- the value of the
avgAccessCountrecord component
-