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 intervalmaxAttempts- 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 Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRetryProperties(long initialInterval, double multiplier, long maxInterval, int maxAttempts, boolean enabled) Creates an instance of aRetryPropertiesrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanenabled()Returns the value of theenabledrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longReturns the value of theinitialIntervalrecord component.intReturns the value of themaxAttemptsrecord component.longReturns the value of themaxIntervalrecord component.doubleReturns the value of themultiplierrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
Default instance.
-
-
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 aRetryPropertiesrecord class.- Parameters:
initialInterval- the value for theinitialIntervalrecord componentmultiplier- the value for themultiplierrecord componentmaxInterval- the value for themaxIntervalrecord componentmaxAttempts- the value for themaxAttemptsrecord componentenabled- the value for theenabledrecord component
-
-
Method Details
-
toString
-
hashCode
-
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 with thecomparemethod from their corresponding wrapper classes. -
initialInterval
public long initialInterval()Returns the value of theinitialIntervalrecord component.- Returns:
- the value of the
initialIntervalrecord component
-
multiplier
public double multiplier()Returns the value of themultiplierrecord component.- Returns:
- the value of the
multiplierrecord component
-
maxInterval
public long maxInterval()Returns the value of themaxIntervalrecord component.- Returns:
- the value of the
maxIntervalrecord component
-
maxAttempts
public int maxAttempts()Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-
enabled
-