Record Class CacheLoaderIntegration.LoaderStats
java.lang.Object
java.lang.Record
com.loomcache.server.jcache.CacheLoaderIntegration.LoaderStats
- Enclosing class:
CacheLoaderIntegration<K,V>
public static record CacheLoaderIntegration.LoaderStats(long totalLoads, long cacheHits, long cacheMisses, double avgLoadTimeMs)
extends Record
Loader statistics snapshot.
-
Constructor Summary
ConstructorsConstructorDescriptionLoaderStats(long totalLoads, long cacheHits, long cacheMisses, double avgLoadTimeMs) Creates an instance of aLoaderStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgLoadTimeMsrecord component.longReturns the value of thecacheHitsrecord component.longReturns the value of thecacheMissesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalLoadsrecord component.
-
Constructor Details
-
LoaderStats
public LoaderStats(long totalLoads, long cacheHits, long cacheMisses, double avgLoadTimeMs) Creates an instance of aLoaderStatsrecord class.- Parameters:
totalLoads- the value for thetotalLoadsrecord componentcacheHits- the value for thecacheHitsrecord componentcacheMisses- the value for thecacheMissesrecord componentavgLoadTimeMs- the value for theavgLoadTimeMsrecord 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. -
totalLoads
public long totalLoads()Returns the value of thetotalLoadsrecord component.- Returns:
- the value of the
totalLoadsrecord component
-
cacheHits
public long cacheHits()Returns the value of thecacheHitsrecord component.- Returns:
- the value of the
cacheHitsrecord component
-
cacheMisses
public long cacheMisses()Returns the value of thecacheMissesrecord component.- Returns:
- the value of the
cacheMissesrecord component
-
avgLoadTimeMs
public double avgLoadTimeMs()Returns the value of theavgLoadTimeMsrecord component.- Returns:
- the value of the
avgLoadTimeMsrecord component
-