Record Class RetryProperties

java.lang.Object
java.lang.Record
org.springframework.cloud.kubernetes.commons.config.RetryProperties
Record Components:
initialInterval - Initial retry interval in milliseconds.
multiplier - Maximum interval for backoff.
maxInterval - Maximum interval
maxAttempts - Maximum number of attempts.
enabled - Retry enabled or not

public record RetryProperties(long initialInterval, double multiplier, long maxInterval, int maxAttempts, boolean enabled) extends Record
Author:
wind57 Kubernetes config retry properties.
  • Field Details

  • Constructor Details

    • RetryProperties

      public RetryProperties(@DefaultValue("1000") long initialInterval, @DefaultValue("1.1") double multiplier, @DefaultValue("2000") long maxInterval, @DefaultValue("6") int maxAttempts, @DefaultValue("true") boolean enabled)
      Creates an instance of a RetryProperties record class.
      Parameters:
      initialInterval - the value for the initialInterval record component
      multiplier - the value for the multiplier record component
      maxInterval - the value for the maxInterval record component
      maxAttempts - the value for the maxAttempts record component
      enabled - the value for the enabled record component
  • 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 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.
    • initialInterval

      public long initialInterval()
      Returns the value of the initialInterval record component.
      Returns:
      the value of the initialInterval record component
    • multiplier

      public double multiplier()
      Returns the value of the multiplier record component.
      Returns:
      the value of the multiplier record component
    • maxInterval

      public long maxInterval()
      Returns the value of the maxInterval record component.
      Returns:
      the value of the maxInterval record component
    • maxAttempts

      public int maxAttempts()
      Returns the value of the maxAttempts record component.
      Returns:
      the value of the maxAttempts record component
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component