Record Class ClientRetryProfile

java.lang.Object
java.lang.Record
org.j7m.middleware.application.api.ClientRetryProfile
Record Components:
maximumAdditionalAttempts - maximum retries after the initial call, from0 to16
initialBackoff - initial nonnegative backoff, at most30 seconds
maximumBackoff - backoff cap, at least the initial value and at most30 seconds
jitterFraction - finite proportional jitter from0 to1; the cap still applies after jitter

public record ClientRetryProfile(int maximumAdditionalAttempts, Duration initialBackoff, Duration maximumBackoff, double jitterFraction) extends Record
Finite trusted-host limits for optional pre-delivery retry. No profile enables replay after business entry, durable deduplication, or exactly-once external effects.
  • Constructor Details

    • ClientRetryProfile

      public ClientRetryProfile(int maximumAdditionalAttempts, Duration initialBackoff, Duration maximumBackoff, double jitterFraction)
      Validates finite retry bounds without allocating workers.
      Parameters:
      maximumAdditionalAttempts - retries after the first call
      initialBackoff - initial nonnegative delay
      maximumBackoff - finite maximum delay
      jitterFraction - finite value in the inclusive range0..1
      Throws:
      IllegalArgumentException - for an invalid count, duration, cap or jitter value
  • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • maximumAdditionalAttempts

      public int maximumAdditionalAttempts()
      Returns the value of the maximumAdditionalAttempts record component.
      Returns:
      the value of the maximumAdditionalAttempts record component
    • initialBackoff

      public Duration initialBackoff()
      Returns the value of the initialBackoff record component.
      Returns:
      the value of the initialBackoff record component
    • maximumBackoff

      public Duration maximumBackoff()
      Returns the value of the maximumBackoff record component.
      Returns:
      the value of the maximumBackoff record component
    • jitterFraction

      public double jitterFraction()
      Returns the value of the jitterFraction record component.
      Returns:
      the value of the jitterFraction record component