Record Class ServiceConfig.MethodConfig.RetryPolicy
java.lang.Object
java.lang.Record
org.springframework.boot.grpc.client.autoconfigure.ServiceConfig.MethodConfig.RetryPolicy
- Record Components:
maxAttempts- maximum number of RPC attempts, including the original attemptinitialBackoff- initial exponential backoffmaxBackoff- maximum exponential backoffbackoffMultiplier- exponential backoff multiplierperAttemptReceiveTimeout- per-attempt receive timeoutretryableStatusCodes- status codes which may be retried
- Enclosing class:
ServiceConfig.MethodConfig
public static record ServiceConfig.MethodConfig.RetryPolicy(Integer maxAttempts, Duration initialBackoff, Duration maxBackoff, Double backoffMultiplier, Duration perAttemptReceiveTimeout, Set<io.grpc.Status.Code> retryableStatusCodes)
extends Record
Retry policy for outgoing RPCs.
- Since:
- 4.1.0
- Author:
- Phillip Webb
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackoffMultiplierrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinitialBackoffrecord component.Returns the value of themaxAttemptsrecord component.Returns the value of themaxBackoffrecord component.Returns the value of theperAttemptReceiveTimeoutrecord component.Set<io.grpc.Status.Code> Returns the value of theretryableStatusCodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RetryPolicy
public RetryPolicy(Integer maxAttempts, Duration initialBackoff, Duration maxBackoff, Double backoffMultiplier, Duration perAttemptReceiveTimeout, Set<io.grpc.Status.Code> retryableStatusCodes) Creates an instance of aRetryPolicyrecord class.- Parameters:
maxAttempts- the value for themaxAttemptsrecord componentinitialBackoff- the value for theinitialBackoffrecord componentmaxBackoff- the value for themaxBackoffrecord componentbackoffMultiplier- the value for thebackoffMultiplierrecord componentperAttemptReceiveTimeout- the value for theperAttemptReceiveTimeoutrecord componentretryableStatusCodes- the value for theretryableStatusCodesrecord 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 withObjects::equals(Object,Object). -
maxAttempts
Returns the value of themaxAttemptsrecord component.- Returns:
- the value of the
maxAttemptsrecord component
-
initialBackoff
Returns the value of theinitialBackoffrecord component.- Returns:
- the value of the
initialBackoffrecord component
-
maxBackoff
Returns the value of themaxBackoffrecord component.- Returns:
- the value of the
maxBackoffrecord component
-
backoffMultiplier
Returns the value of thebackoffMultiplierrecord component.- Returns:
- the value of the
backoffMultiplierrecord component
-
perAttemptReceiveTimeout
Returns the value of theperAttemptReceiveTimeoutrecord component.- Returns:
- the value of the
perAttemptReceiveTimeoutrecord component
-
retryableStatusCodes
Returns the value of theretryableStatusCodesrecord component.- Returns:
- the value of the
retryableStatusCodesrecord component
-