Record Class ServiceConfig.MethodConfig.HedgingPolicy
java.lang.Object
java.lang.Record
org.springframework.boot.grpc.client.autoconfigure.ServiceConfig.MethodConfig.HedgingPolicy
- Record Components:
maxAttempts- maximum number of send attemptsdelay- delay for subsequent RPCsnonFatalStatusCodes- status codes which indicate other hedged RPCs may still succeed
- Enclosing class:
ServiceConfig.MethodConfig
-
Constructor Summary
ConstructorsConstructorDescriptionHedgingPolicy(Integer maxAttempts, Duration delay, Set<io.grpc.Status.Code> nonFatalStatusCodes) Creates an instance of aHedgingPolicyrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondelay()Returns the value of thedelayrecord 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 themaxAttemptsrecord component.Set<io.grpc.Status.Code> Returns the value of thenonFatalStatusCodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
HedgingPolicy
public HedgingPolicy(Integer maxAttempts, Duration delay, Set<io.grpc.Status.Code> nonFatalStatusCodes) Creates an instance of aHedgingPolicyrecord class.- Parameters:
maxAttempts- the value for themaxAttemptsrecord componentdelay- the value for thedelayrecord componentnonFatalStatusCodes- the value for thenonFatalStatusCodesrecord 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
-
delay
-
nonFatalStatusCodes
Returns the value of thenonFatalStatusCodesrecord component.- Returns:
- the value of the
nonFatalStatusCodesrecord component
-