Record Class RetryPolicy
java.lang.Object
java.lang.Record
org.j7m.middleware.workload.api.RetryPolicy
- Record Components:
maxAttempts- maximum attempts including the first attemptbackoff- delay between attempts
-
Constructor Summary
ConstructorsConstructorDescriptionRetryPolicy(int maxAttempts, Duration backoff) Creates a bounded retry policy. -
Method Summary
Modifier and TypeMethodDescriptionbackoff()Returns the value of thebackoffrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intReturns the value of themaxAttemptsrecord component.static RetryPolicynone()Returns a no-retry policy.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetryPolicy
Creates a bounded retry policy.
-
-
Method Details
-
none
-
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. -
maxAttempts
public int maxAttempts()Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-
backoff
-