Record Class ServiceConfig.MethodConfig
java.lang.Object
java.lang.Record
org.springframework.boot.grpc.client.autoconfigure.ServiceConfig.MethodConfig
- Record Components:
name- Names of the methods to which this configuration applieswaitForReady- Whether RPCs sent to this method should wait until the connection is ready by defaultmaxRequestMessage- maximum allowed payload size for an individual request or object in a streammaxResponseMessage- maximum allowed payload size for an individual response or object in a streamtimeout- default timeout for RPCs sent to this methodretry- retry policy for outgoing RPCshedging- hedging policy for outgoing RPCs
- Enclosing class:
ServiceConfig
public static record ServiceConfig.MethodConfig(List<ServiceConfig.MethodConfig.Name> name, Boolean waitForReady, DataSize maxRequestMessage, DataSize maxResponseMessage, Duration timeout, ServiceConfig.MethodConfig.RetryPolicy retry, ServiceConfig.MethodConfig.HedgingPolicy hedging)
extends Record
Method configuration.
- Since:
- 4.1.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordHedging policy for outgoing RPCs.static final recordThe name of a gRPC method.static final recordRetry policy for outgoing RPCs. -
Constructor Summary
ConstructorsConstructorDescriptionMethodConfig(List<ServiceConfig.MethodConfig.Name> name, Boolean waitForReady, DataSize maxRequestMessage, DataSize maxResponseMessage, Duration timeout, ServiceConfig.MethodConfig.RetryPolicy retry, ServiceConfig.MethodConfig.HedgingPolicy hedging) Creates an instance of aMethodConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.hedging()Returns the value of thehedgingrecord component.Returns the value of themaxRequestMessagerecord component.Returns the value of themaxResponseMessagerecord component.name()Returns the value of thenamerecord component.retry()Returns the value of theretryrecord component.timeout()Returns the value of thetimeoutrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewaitForReadyrecord component.
-
Constructor Details
-
MethodConfig
public MethodConfig(List<ServiceConfig.MethodConfig.Name> name, Boolean waitForReady, DataSize maxRequestMessage, DataSize maxResponseMessage, Duration timeout, ServiceConfig.MethodConfig.RetryPolicy retry, ServiceConfig.MethodConfig.HedgingPolicy hedging) Creates an instance of aMethodConfigrecord class.- Parameters:
name- the value for thenamerecord componentwaitForReady- the value for thewaitForReadyrecord componentmaxRequestMessage- the value for themaxRequestMessagerecord componentmaxResponseMessage- the value for themaxResponseMessagerecord componenttimeout- the value for thetimeoutrecord componentretry- the value for theretryrecord componenthedging- the value for thehedgingrecord 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). -
name
-
waitForReady
Returns the value of thewaitForReadyrecord component.- Returns:
- the value of the
waitForReadyrecord component
-
maxRequestMessage
Returns the value of themaxRequestMessagerecord component.- Returns:
- the value of the
maxRequestMessagerecord component
-
maxResponseMessage
Returns the value of themaxResponseMessagerecord component.- Returns:
- the value of the
maxResponseMessagerecord component
-
timeout
-
retry
-
hedging
-