Record Class CacheWarmer.WarmingStats
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.warming.CacheWarmer.WarmingStats
- Record Components:
totalWarmed- total number of warmed entries | 总预热条目数totalFailed- total number of failed entries | 总失败条目数totalSkipped- total number of skipped entries | 总跳过条目数
- Enclosing class:
CacheWarmer<K,V>
public static record CacheWarmer.WarmingStats(long totalWarmed, long totalFailed, long totalSkipped)
extends Record
Warming statistics
预热统计
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionWarmingStats(long totalWarmed, long totalFailed, long totalSkipped) Creates an instance of aWarmingStatsrecord 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.doubleReturns the success rate | 返回成功率final StringtoString()Returns a string representation of this record class.longtotal()Returns the total count | 返回总数longReturns the value of thetotalFailedrecord component.longReturns the value of thetotalSkippedrecord component.longReturns the value of thetotalWarmedrecord component.
-
Constructor Details
-
WarmingStats
public WarmingStats(long totalWarmed, long totalFailed, long totalSkipped) Creates an instance of aWarmingStatsrecord class.- Parameters:
totalWarmed- the value for thetotalWarmedrecord componenttotalFailed- the value for thetotalFailedrecord componenttotalSkipped- the value for thetotalSkippedrecord component
-
-
Method Details
-
total
public long total()Returns the total count | 返回总数- Returns:
- total count | 总数
-
successRate
public double successRate()Returns the success rate | 返回成功率- Returns:
- success rate (0.0 to 1.0) | 成功率
-
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. -
totalWarmed
public long totalWarmed()Returns the value of thetotalWarmedrecord component.- Returns:
- the value of the
totalWarmedrecord component
-
totalFailed
public long totalFailed()Returns the value of thetotalFailedrecord component.- Returns:
- the value of the
totalFailedrecord component
-
totalSkipped
public long totalSkipped()Returns the value of thetotalSkippedrecord component.- Returns:
- the value of the
totalSkippedrecord component
-