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_TIME
ms.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 enum
The back-off policy. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of theinitialInterval
record component.Returns the value of themaxAttempts
record component.Returns the value of themaxElapsedTime
record component.Returns the value of themaxInterval
record component.Returns the value of themultiplier
record component.policy()
Returns the value of thepolicy
record component.final String
toString()
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 aRetry
record class.- Parameters:
policy
- the value for thepolicy
record componentinitialInterval
- the value for theinitialInterval
record componentmaxInterval
- the value for themaxInterval
record componentmaxElapsedTime
- the value for themaxElapsedTime
record componentmultiplier
- the value for themultiplier
record componentmaxAttempts
- the value for themaxAttempts
record 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 thepolicy
record component.- Returns:
- the value of the
policy
record component
-
initialInterval
Returns the value of theinitialInterval
record component.- Returns:
- the value of the
initialInterval
record component
-
maxInterval
Returns the value of themaxInterval
record component.- Returns:
- the value of the
maxInterval
record component
-
maxElapsedTime
Returns the value of themaxElapsedTime
record component.- Returns:
- the value of the
maxElapsedTime
record component
-
multiplier
Returns the value of themultiplier
record component.- Returns:
- the value of the
multiplier
record component
-
maxAttempts
Returns the value of themaxAttempts
record component.- Returns:
- the value of the
maxAttempts
record component
-