Record Class SimpleRetrierConfig.NamedConfig
java.lang.Object
java.lang.Record
ru.tinkoff.kora.resilient.retry.simple.SimpleRetrierConfig.NamedConfig
- Enclosing class:
- SimpleRetrierConfig
public static record SimpleRetrierConfig.NamedConfig(@Nullable Duration delay, @Nullable Duration delayStep, @Nullable Integer attempts, @Nullable String failurePredicateName)
extends Record
delay Attempt initial delay
delayStep Delay step used to calculate next delay (previous delay + delay step)
attempts Maximum number of retry attempts
failurePredicateName RetrierFailurePredicate.name() default is RetrierFailurePredicate-
Constructor Summary
ConstructorsConstructorDescriptionNamedConfig(Duration delay, Duration delayStep, Integer attempts, String failurePredicateName) Creates an instance of aNamedConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionattempts()Returns the value of theattemptsrecord component.delay()Returns the value of thedelayrecord component.Returns the value of thedelaySteprecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailurePredicateNamerecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
NamedConfig
public NamedConfig(@Nullable Duration delay, @Nullable Duration delayStep, @Nullable Integer attempts, @Nullable String failurePredicateName) Creates an instance of aNamedConfigrecord class.- Parameters:
delay- the value for thedelayrecord componentdelayStep- the value for thedelaySteprecord componentattempts- the value for theattemptsrecord componentfailurePredicateName- the value for thefailurePredicateNamerecord component
-
-
Method Details
-
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. -
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. -
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 withObjects::equals(Object,Object). -
delay
Returns the value of thedelayrecord component.- Returns:
- the value of the
delayrecord component
-
delayStep
Returns the value of thedelaySteprecord component.- Returns:
- the value of the
delaySteprecord component
-
attempts
Returns the value of theattemptsrecord component.- Returns:
- the value of the
attemptsrecord component
-
failurePredicateName
Returns the value of thefailurePredicateNamerecord component.- Returns:
- the value of the
failurePredicateNamerecord component
-