Record Class WriteCoalescer.CoalescerStats

java.lang.Object
java.lang.Record
cloud.opencode.base.cache.write.WriteCoalescer.CoalescerStats
Record Components:
totalWrites - total number of writes | 总写入数
totalFlushes - total number of flushes | 总刷新数
totalBatched - total number of batched writes | 总批量写入数
totalDeduplicated - total number of deduplicated writes | 总去重写入数
totalErrors - total number of errors | 总错误数
currentPending - current number of pending writes | 当前待处理写入数
Enclosing class:
WriteCoalescer<K,V>

public static record WriteCoalescer.CoalescerStats(long totalWrites, long totalFlushes, long totalBatched, long totalDeduplicated, long totalErrors, int currentPending) extends Record
Coalescer statistics 合并器统计
Since:
JDK 25, opencode-base-cache V2.0.5
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • CoalescerStats

      public CoalescerStats(long totalWrites, long totalFlushes, long totalBatched, long totalDeduplicated, long totalErrors, int currentPending)
      Creates an instance of a CoalescerStats record class.
      Parameters:
      totalWrites - the value for the totalWrites record component
      totalFlushes - the value for the totalFlushes record component
      totalBatched - the value for the totalBatched record component
      totalDeduplicated - the value for the totalDeduplicated record component
      totalErrors - the value for the totalErrors record component
      currentPending - the value for the currentPending record component
  • Method Details

    • deduplicationRate

      public double deduplicationRate()
      Get deduplication rate 获取去重率
      Returns:
      deduplication rate | 去重率
    • averageBatchSize

      public double averageBatchSize()
      Get average batch size 获取平均批次大小
      Returns:
      average batch size | 平均批次大小
    • errorRate

      public double errorRate()
      Get error rate 获取错误率
      Returns:
      error rate | 错误率
    • 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.
    • totalWrites

      public long totalWrites()
      Returns the value of the totalWrites record component.
      Returns:
      the value of the totalWrites record component
    • totalFlushes

      public long totalFlushes()
      Returns the value of the totalFlushes record component.
      Returns:
      the value of the totalFlushes record component
    • totalBatched

      public long totalBatched()
      Returns the value of the totalBatched record component.
      Returns:
      the value of the totalBatched record component
    • totalDeduplicated

      public long totalDeduplicated()
      Returns the value of the totalDeduplicated record component.
      Returns:
      the value of the totalDeduplicated record component
    • totalErrors

      public long totalErrors()
      Returns the value of the totalErrors record component.
      Returns:
      the value of the totalErrors record component
    • currentPending

      public int currentPending()
      Returns the value of the currentPending record component.
      Returns:
      the value of the currentPending record component