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

    Constructors
    Constructor
    Description
    WarmingStats(long totalWarmed, long totalFailed, long totalSkipped)
    Creates an instance of a WarmingStats record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the success rate | 返回成功率
    final String
    Returns a string representation of this record class.
    long
    Returns the total count | 返回总数
    long
    Returns the value of the totalFailed record component.
    long
    Returns the value of the totalSkipped record component.
    long
    Returns the value of the totalWarmed record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • WarmingStats

      public WarmingStats(long totalWarmed, long totalFailed, long totalSkipped)
      Creates an instance of a WarmingStats record class.
      Parameters:
      totalWarmed - the value for the totalWarmed record component
      totalFailed - the value for the totalFailed record component
      totalSkipped - the value for the totalSkipped record 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

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • totalWarmed

      public long totalWarmed()
      Returns the value of the totalWarmed record component.
      Returns:
      the value of the totalWarmed record component
    • totalFailed

      public long totalFailed()
      Returns the value of the totalFailed record component.
      Returns:
      the value of the totalFailed record component
    • totalSkipped

      public long totalSkipped()
      Returns the value of the totalSkipped record component.
      Returns:
      the value of the totalSkipped record component