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 to ExponentialBackOff.DEFAULT_INITIAL_INTERVAL.
maxInterval - The maximum back-off interval. Defaults to ExponentialBackOff.DEFAULT_MAX_INTERVAL.
maxElapsedTime - The maximum elapsed time duration before retry is cancelled. Defaults to ExponentialBackOff.DEFAULT_MAX_ELAPSED_TIME ms.
multiplier - The time interval multiplier used "exponential_backoff". Defaults to ExponentialBackOff.DEFAULT_MULTIPLIER.
maxAttempts - The maximum number of attempts before retry is cancelled. Defaults to ExponentialBackOff.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.
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • policy

      Returns the value of the policy record component.
      Returns:
      the value of the policy record component
    • initialInterval

      public Duration initialInterval()
      Returns the value of the initialInterval record component.
      Returns:
      the value of the initialInterval record component
    • maxInterval

      public Duration maxInterval()
      Returns the value of the maxInterval record component.
      Returns:
      the value of the maxInterval record component
    • maxElapsedTime

      public Duration maxElapsedTime()
      Returns the value of the maxElapsedTime record component.
      Returns:
      the value of the maxElapsedTime record component
    • multiplier

      public Double multiplier()
      Returns the value of the multiplier record component.
      Returns:
      the value of the multiplier record component
    • maxAttempts

      public Integer maxAttempts()
      Returns the value of the maxAttempts record component.
      Returns:
      the value of the maxAttempts record component