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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgRetriesPerEntryrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorTypeCountsrecord component.Returns the value of thefrequentFailuresrecord component.final inthashCode()Returns a hash code value for this object.mostCommonErrorType | mostCommonErrorTypeReturns the value of thenewestFailurerecord component.Returns the value of theoldestFailurerecord component.final StringtoString()Returns a string representation of this record class.intReturns the value of thetotalEntriesrecord component.intReturns the value of thetotalRetriesrecord component.
-
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 aDlqAnalysisrecord class.- Parameters:
totalEntries- the value for thetotalEntriesrecord componenttotalRetries- the value for thetotalRetriesrecord componentavgRetriesPerEntry- the value for theavgRetriesPerEntryrecord componenterrorTypeCounts- the value for theerrorTypeCountsrecord componentoldestFailure- the value for theoldestFailurerecord componentnewestFailure- the value for thenewestFailurerecord componentfrequentFailures- the value for thefrequentFailuresrecord component
-
-
Method Details
-
mostCommonErrorType
mostCommonErrorType | mostCommonErrorType- 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
totalEntries
public int totalEntries()Returns the value of thetotalEntriesrecord component.- Returns:
- the value of the
totalEntriesrecord component
-
totalRetries
public int totalRetries()Returns the value of thetotalRetriesrecord component.- Returns:
- the value of the
totalRetriesrecord component
-
avgRetriesPerEntry
public double avgRetriesPerEntry()Returns the value of theavgRetriesPerEntryrecord component.- Returns:
- the value of the
avgRetriesPerEntryrecord component
-
errorTypeCounts
Returns the value of theerrorTypeCountsrecord component.- Returns:
- the value of the
errorTypeCountsrecord component
-
oldestFailure
Returns the value of theoldestFailurerecord component.- Returns:
- the value of the
oldestFailurerecord component
-
newestFailure
Returns the value of thenewestFailurerecord component.- Returns:
- the value of the
newestFailurerecord component
-
frequentFailures
Returns the value of thefrequentFailuresrecord component.- Returns:
- the value of the
frequentFailuresrecord component
-