Record Class ClientRetryProfile
java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.ClientRetryProfile
- Record Components:
maximumAdditionalAttempts- maximum retries after the initial call, from0 to16initialBackoff- initial nonnegative backoff, at most30 secondsmaximumBackoff- backoff cap, at least the initial value and at most30 secondsjitterFraction- finite proportional jitter from0 to1; the cap still applies after jitter
public record ClientRetryProfile(int maximumAdditionalAttempts, Duration initialBackoff, Duration maximumBackoff, double jitterFraction)
extends Record
Finite trusted-host limits for optional pre-delivery retry. No profile enables replay after
business entry, durable deduplication, or exactly-once external effects.
-
Constructor Summary
ConstructorsConstructorDescriptionClientRetryProfile(int maximumAdditionalAttempts, Duration initialBackoff, Duration maximumBackoff, double jitterFraction) Validates finite retry bounds without allocating workers. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialBackoffrecord component.doubleReturns the value of thejitterFractionrecord component.intReturns the value of themaximumAdditionalAttemptsrecord component.Returns the value of themaximumBackoffrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClientRetryProfile
public ClientRetryProfile(int maximumAdditionalAttempts, Duration initialBackoff, Duration maximumBackoff, double jitterFraction) Validates finite retry bounds without allocating workers.- Parameters:
maximumAdditionalAttempts- retries after the first callinitialBackoff- initial nonnegative delaymaximumBackoff- finite maximum delayjitterFraction- finite value in the inclusive range0..1- Throws:
IllegalArgumentException- for an invalid count, duration, cap or jitter value
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
maximumAdditionalAttempts
public int maximumAdditionalAttempts()Returns the value of themaximumAdditionalAttemptsrecord component.- Returns:
- the value of the
maximumAdditionalAttemptsrecord component
-
initialBackoff
Returns the value of theinitialBackoffrecord component.- Returns:
- the value of the
initialBackoffrecord component
-
maximumBackoff
Returns the value of themaximumBackoffrecord component.- Returns:
- the value of the
maximumBackoffrecord component
-
jitterFraction
public double jitterFraction()Returns the value of thejitterFractionrecord component.- Returns:
- the value of the
jitterFractionrecord component
-