Record Class DeadLetterQueue.DlqAnalysis<K>

java.lang.Object
java.lang.Record
cloud.opencode.base.cache.dlq.DeadLetterQueue.DlqAnalysis<K>
Type Parameters:
K - the key type | 键类型
Record Components:
totalEntries - the total number of entries | 总条目数
totalRetries - the total number of retries | 总重试数
avgRetriesPerEntry - the average retries per entry | 每条目平均重试数
errorTypeCounts - the error type counts | 错误类型计数
oldestFailure - the oldest failure time | 最早失败时间
newestFailure - the newest failure time | 最近失败时间
frequentFailures - the frequently failing keys | 频繁失败的键
Enclosing class:
DeadLetterQueue<K>

public static record DeadLetterQueue.DlqAnalysis<K>(int totalEntries, int totalRetries, double avgRetriesPerEntry, Map<String,Long> errorTypeCounts, Instant oldestFailure, Instant newestFailure, List<K> frequentFailures) extends Record
DLQ analysis result DLQ 分析结果
Since:
JDK 25, opencode-base-cache V2.0.5
Author:
Leon Soo www.LeonSoo.com
  • Constructor Details

    • DlqAnalysis

      public DlqAnalysis(int totalEntries, int totalRetries, double avgRetriesPerEntry, Map<String,Long> errorTypeCounts, Instant oldestFailure, Instant newestFailure, List<K> frequentFailures)
      Creates an instance of a DlqAnalysis record class.
      Parameters:
      totalEntries - the value for the totalEntries record component
      totalRetries - the value for the totalRetries record component
      avgRetriesPerEntry - the value for the avgRetriesPerEntry record component
      errorTypeCounts - the value for the errorTypeCounts record component
      oldestFailure - the value for the oldestFailure record component
      newestFailure - the value for the newestFailure record component
      frequentFailures - the value for the frequentFailures record component
  • Method Details

    • mostCommonErrorType

      public String mostCommonErrorType()
      mostCommonErrorType | mostCommonErrorType
      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. Reference components are compared with Objects::equals(Object,Object); primitive components 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.
    • totalEntries

      public int totalEntries()
      Returns the value of the totalEntries record component.
      Returns:
      the value of the totalEntries record component
    • totalRetries

      public int totalRetries()
      Returns the value of the totalRetries record component.
      Returns:
      the value of the totalRetries record component
    • avgRetriesPerEntry

      public double avgRetriesPerEntry()
      Returns the value of the avgRetriesPerEntry record component.
      Returns:
      the value of the avgRetriesPerEntry record component
    • errorTypeCounts

      public Map<String,Long> errorTypeCounts()
      Returns the value of the errorTypeCounts record component.
      Returns:
      the value of the errorTypeCounts record component
    • oldestFailure

      public Instant oldestFailure()
      Returns the value of the oldestFailure record component.
      Returns:
      the value of the oldestFailure record component
    • newestFailure

      public Instant newestFailure()
      Returns the value of the newestFailure record component.
      Returns:
      the value of the newestFailure record component
    • frequentFailures

      public List<K> frequentFailures()
      Returns the value of the frequentFailures record component.
      Returns:
      the value of the frequentFailures record component