Record Class RetryPolicy.RetryStats
java.lang.Object
java.lang.Record
com.loomcache.client.retry.RetryPolicy.RetryStats
- Enclosing class:
RetryPolicy
public static record RetryPolicy.RetryStats(long totalAttempts, long totalSuccesses, long totalFailures, long totalRetries, double avgRetryDelayMs)
extends Record
Statistics snapshot for retry operations.
-
Constructor Summary
ConstructorsConstructorDescriptionRetryStats(long totalAttempts, long totalSuccesses, long totalFailures, long totalRetries, double avgRetryDelayMs) Creates an instance of aRetryStatsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of theavgRetryDelayMsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.longReturns the value of thetotalAttemptsrecord component.longReturns the value of thetotalFailuresrecord component.longReturns the value of thetotalRetriesrecord component.longReturns the value of thetotalSuccessesrecord component.
-
Constructor Details
-
RetryStats
public RetryStats(long totalAttempts, long totalSuccesses, long totalFailures, long totalRetries, double avgRetryDelayMs) Creates an instance of aRetryStatsrecord class.- Parameters:
totalAttempts- the value for thetotalAttemptsrecord componenttotalSuccesses- the value for thetotalSuccessesrecord componenttotalFailures- the value for thetotalFailuresrecord componenttotalRetries- the value for thetotalRetriesrecord componentavgRetryDelayMs- the value for theavgRetryDelayMsrecord component
-
-
Method Details
-
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. -
totalAttempts
public long totalAttempts()Returns the value of thetotalAttemptsrecord component.- Returns:
- the value of the
totalAttemptsrecord component
-
totalSuccesses
public long totalSuccesses()Returns the value of thetotalSuccessesrecord component.- Returns:
- the value of the
totalSuccessesrecord component
-
totalFailures
public long totalFailures()Returns the value of thetotalFailuresrecord component.- Returns:
- the value of the
totalFailuresrecord component
-
totalRetries
public long totalRetries()Returns the value of thetotalRetriesrecord component.- Returns:
- the value of the
totalRetriesrecord component
-
avgRetryDelayMs
public double avgRetryDelayMs()Returns the value of theavgRetryDelayMsrecord component.- Returns:
- the value of the
avgRetryDelayMsrecord component
-