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 Summary
ConstructorsConstructorDescriptionCoalescerStats(long totalWrites, long totalFlushes, long totalBatched, long totalDeduplicated, long totalErrors, int currentPending) Creates an instance of aCoalescerStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleGet average batch size 获取平均批次大小intReturns the value of thecurrentPendingrecord component.doubleGet deduplication rate 获取去重率final booleanIndicates whether some other object is "equal to" this one.doubleGet error rate 获取错误率final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalBatchedrecord component.longReturns the value of thetotalDeduplicatedrecord component.longReturns the value of thetotalErrorsrecord component.longReturns the value of thetotalFlushesrecord component.longReturns the value of thetotalWritesrecord component.
-
Constructor Details
-
CoalescerStats
public CoalescerStats(long totalWrites, long totalFlushes, long totalBatched, long totalDeduplicated, long totalErrors, int currentPending) Creates an instance of aCoalescerStatsrecord class.- Parameters:
totalWrites- the value for thetotalWritesrecord componenttotalFlushes- the value for thetotalFlushesrecord componenttotalBatched- the value for thetotalBatchedrecord componenttotalDeduplicated- the value for thetotalDeduplicatedrecord componenttotalErrors- the value for thetotalErrorsrecord componentcurrentPending- the value for thecurrentPendingrecord 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
-
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. -
totalWrites
public long totalWrites()Returns the value of thetotalWritesrecord component.- Returns:
- the value of the
totalWritesrecord component
-
totalFlushes
public long totalFlushes()Returns the value of thetotalFlushesrecord component.- Returns:
- the value of the
totalFlushesrecord component
-
totalBatched
public long totalBatched()Returns the value of thetotalBatchedrecord component.- Returns:
- the value of the
totalBatchedrecord component
-
totalDeduplicated
public long totalDeduplicated()Returns the value of thetotalDeduplicatedrecord component.- Returns:
- the value of the
totalDeduplicatedrecord component
-
totalErrors
public long totalErrors()Returns the value of thetotalErrorsrecord component.- Returns:
- the value of the
totalErrorsrecord component
-
currentPending
public int currentPending()Returns the value of thecurrentPendingrecord component.- Returns:
- the value of the
currentPendingrecord component
-