Record Class LayeredCache.LayeredCacheStats
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.LayeredCache.LayeredCacheStats
- Record Components:
l1Stats- L1 statistics | L1统计l2Stats- L2 statistics | L2统计
- Enclosing class:
LayeredCache<K,V>
public static record LayeredCache.LayeredCacheStats(CacheStats l1Stats, CacheStats l2Stats)
extends Record
Layered cache statistics
分层缓存统计
- Since:
- JDK 25, opencode-base-cache V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionLayeredCacheStats(CacheStats l1Stats, CacheStats l2Stats) Creates an instance of aLayeredCacheStatsrecord 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.doubleGets L1 hit rate 获取L1命中率l1Stats()Returns the value of thel1Statsrecord component.doubleGets L2 hit rate 获取L2命中率l2Stats()Returns the value of thel2Statsrecord component.doubleGets overall hit rate 获取总体命中率final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
l1HitRate
public double l1HitRate()Gets L1 hit rate 获取L1命中率- Returns:
- L1 hit rate | L1命中率
-
l2HitRate
public double l2HitRate()Gets L2 hit rate 获取L2命中率- Returns:
- L2 hit rate | L2命中率
-
overallHitRate
public double overallHitRate()Gets overall hit rate 获取总体命中率- Returns:
- overall hit rate | 总体命中率
-
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 withObjects::equals(Object,Object). -
l1Stats
-
l2Stats
-