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 Details

    • DlqStats

      public DlqStats(long totalAdded, long totalRetried, long totalRecovered, long totalDiscarded, int currentSize)
      Creates an instance of a DlqStats record class.
      Parameters:
      totalAdded - the value for the totalAdded record component
      totalRetried - the value for the totalRetried record component
      totalRecovered - the value for the totalRecovered record component
      totalDiscarded - the value for the totalDiscarded record component
      currentSize - the value for the currentSize record component
  • Method Details

    • recoveryRate

      public double recoveryRate()
      recoveryRate | recoveryRate
      Returns:
      the result | 结果
    • 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.
    • totalAdded

      public long totalAdded()
      Returns the value of the totalAdded record component.
      Returns:
      the value of the totalAdded record component
    • totalRetried

      public long totalRetried()
      Returns the value of the totalRetried record component.
      Returns:
      the value of the totalRetried record component
    • totalRecovered

      public long totalRecovered()
      Returns the value of the totalRecovered record component.
      Returns:
      the value of the totalRecovered record component
    • totalDiscarded

      public long totalDiscarded()
      Returns the value of the totalDiscarded record component.
      Returns:
      the value of the totalDiscarded record component
    • currentSize

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