Record Class DeadLetterQueue.DlqStats
java.lang.Object
java.lang.Record
cloud.opencode.base.cache.dlq.DeadLetterQueue.DlqStats
- Record Components:
totalAdded- total entries added | 总添加数totalRetried- total entries retried | 总重试数totalRecovered- total entries recovered | 总恢复数totalDiscarded- total entries discarded | 总丢弃数currentSize- current queue size | 当前队列大小
- Enclosing class:
DeadLetterQueue<K>
public static record DeadLetterQueue.DlqStats(long totalAdded, long totalRetried, long totalRecovered, long totalDiscarded, int currentSize)
extends Record
DLQ statistics
DLQ 统计
- Since:
- JDK 25, opencode-base-cache V2.0.5
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
ConstructorsConstructorDescriptionDlqStats(long totalAdded, long totalRetried, long totalRecovered, long totalDiscarded, int currentSize) Creates an instance of aDlqStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of thecurrentSizerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.doublerecoveryRate | recoveryRatefinal StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAddedrecord component.longReturns the value of thetotalDiscardedrecord component.longReturns the value of thetotalRecoveredrecord component.longReturns the value of thetotalRetriedrecord component.
-
Constructor Details
-
DlqStats
public DlqStats(long totalAdded, long totalRetried, long totalRecovered, long totalDiscarded, int currentSize) Creates an instance of aDlqStatsrecord class.- Parameters:
totalAdded- the value for thetotalAddedrecord componenttotalRetried- the value for thetotalRetriedrecord componenttotalRecovered- the value for thetotalRecoveredrecord componenttotalDiscarded- the value for thetotalDiscardedrecord componentcurrentSize- the value for thecurrentSizerecord component
-
-
Method Details
-
recoveryRate
public double recoveryRate()recoveryRate | recoveryRate- Returns:
- the result | 结果
-
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. -
totalAdded
public long totalAdded()Returns the value of thetotalAddedrecord component.- Returns:
- the value of the
totalAddedrecord component
-
totalRetried
public long totalRetried()Returns the value of thetotalRetriedrecord component.- Returns:
- the value of the
totalRetriedrecord component
-
totalRecovered
public long totalRecovered()Returns the value of thetotalRecoveredrecord component.- Returns:
- the value of the
totalRecoveredrecord component
-
totalDiscarded
public long totalDiscarded()Returns the value of thetotalDiscardedrecord component.- Returns:
- the value of the
totalDiscardedrecord component
-
currentSize
public int currentSize()Returns the value of thecurrentSizerecord component.- Returns:
- the value of the
currentSizerecord component
-