Record Class EventHandlingProperties.ProcessorSettings.Retry
java.lang.Object
java.lang.Record
com.opencqrs.framework.eventhandler.EventHandlingProperties.ProcessorSettings.Retry
- Record Components:
policy- The retry policy to apply in case of errors.initialInterval- The initial back-off interval. Defaults toExponentialBackOff.DEFAULT_INITIAL_INTERVAL.maxInterval- The maximum back-off interval. Defaults toExponentialBackOff.DEFAULT_MAX_INTERVAL.maxElapsedTime- The maximum elapsed time duration before retry is cancelled. Defaults toExponentialBackOff.DEFAULT_MAX_ELAPSED_TIMEms.multiplier- The time interval multiplier used "exponential_backoff". Defaults toExponentialBackOff.DEFAULT_MULTIPLIER.maxAttempts- The maximum number of attempts before retry is cancelled. Defaults toExponentialBackOff.DEFAULT_MAX_ATTEMPTS.
- Enclosing class:
EventHandlingProperties.ProcessorSettings
public static record EventHandlingProperties.ProcessorSettings.Retry(EventHandlingProperties.ProcessorSettings.Retry.Policy policy, Duration initialInterval, Duration maxInterval, Duration maxElapsedTime, Double multiplier, Integer maxAttempts)
extends Record
Error handling retry configuration settings. Configuration includes back-off settings, to let erroneous event
handlers recover from (transient) errors between retries. For
EventHandlingProperties.ProcessorSettings.Retry.Policy.NONE all other settings are
ignored.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumThe back-off policy. -
Constructor Summary
Constructors -
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 theinitialIntervalrecord component.Returns the value of themaxAttemptsrecord component.Returns the value of themaxElapsedTimerecord component.Returns the value of themaxIntervalrecord component.Returns the value of themultiplierrecord component.policy()Returns the value of thepolicyrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Retry
public Retry(EventHandlingProperties.ProcessorSettings.Retry.Policy policy, Duration initialInterval, Duration maxInterval, Duration maxElapsedTime, Double multiplier, Integer maxAttempts) Creates an instance of aRetryrecord class.- Parameters:
policy- the value for thepolicyrecord componentinitialInterval- the value for theinitialIntervalrecord componentmaxInterval- the value for themaxIntervalrecord componentmaxElapsedTime- the value for themaxElapsedTimerecord componentmultiplier- the value for themultiplierrecord componentmaxAttempts- the value for themaxAttemptsrecord 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). -
policy
Returns the value of thepolicyrecord component.- Returns:
- the value of the
policyrecord component
-
initialInterval
Returns the value of theinitialIntervalrecord component.- Returns:
- the value of the
initialIntervalrecord component
-
maxInterval
Returns the value of themaxIntervalrecord component.- Returns:
- the value of the
maxIntervalrecord component
-
maxElapsedTime
Returns the value of themaxElapsedTimerecord component.- Returns:
- the value of the
maxElapsedTimerecord component
-
multiplier
Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-
maxAttempts
Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-