Record Class ServiceConfig.LoadBalancingConfig
java.lang.Object
java.lang.Record
org.springframework.boot.grpc.client.autoconfigure.ServiceConfig.LoadBalancingConfig
- Record Components:
pickfirst- 'pick first' load balancingroundrobin- 'round robin' load balancingweightedroundrobin- 'weighted round robin' load balancinggrpc- 'grpc' load balancing
- Enclosing class:
ServiceConfig
public static record ServiceConfig.LoadBalancingConfig(@Nullable ServiceConfig.LoadBalancingConfig.PickFirstLoadBalancingConfig pickfirst, @Nullable ServiceConfig.LoadBalancingConfig.RoundRobinLoadBalancingConfig roundrobin, @Nullable ServiceConfig.LoadBalancingConfig.WeightedRoundRobinLoadBalancingConfig weightedroundrobin, @Nullable ServiceConfig.LoadBalancingConfig.GrpcLoadBalancingConfig grpc)
extends Record
Load balancing config.
- Since:
- 4.1.0
- Author:
- Phillip Webb
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record'grpc' load balancing.static final record'pick first' load balancing.static final record'round robin' load balancing.static final record'weighted round robin' load balancing. -
Constructor Summary
ConstructorsConstructorDescriptionLoadBalancingConfig(@Nullable ServiceConfig.LoadBalancingConfig.PickFirstLoadBalancingConfig pickfirst, @Nullable ServiceConfig.LoadBalancingConfig.RoundRobinLoadBalancingConfig roundrobin, @Nullable ServiceConfig.LoadBalancingConfig.WeightedRoundRobinLoadBalancingConfig weightedroundrobin, @Nullable ServiceConfig.LoadBalancingConfig.GrpcLoadBalancingConfig grpc) Creates an instance of aLoadBalancingConfigrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.grpc()Returns the value of thegrpcrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thepickfirstrecord component.Returns the value of theroundrobinrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theweightedroundrobinrecord component.
-
Constructor Details
-
LoadBalancingConfig
public LoadBalancingConfig(@Nullable ServiceConfig.LoadBalancingConfig.PickFirstLoadBalancingConfig pickfirst, @Nullable ServiceConfig.LoadBalancingConfig.RoundRobinLoadBalancingConfig roundrobin, @Nullable ServiceConfig.LoadBalancingConfig.WeightedRoundRobinLoadBalancingConfig weightedroundrobin, @Nullable ServiceConfig.LoadBalancingConfig.GrpcLoadBalancingConfig grpc) Creates an instance of aLoadBalancingConfigrecord class.- Parameters:
pickfirst- the value for thepickfirstrecord componentroundrobin- the value for theroundrobinrecord componentweightedroundrobin- the value for theweightedroundrobinrecord componentgrpc- the value for thegrpcrecord 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). -
pickfirst
-
roundrobin
Returns the value of theroundrobinrecord component.- Returns:
- the value of the
roundrobinrecord component
-
weightedroundrobin
public @Nullable ServiceConfig.LoadBalancingConfig.WeightedRoundRobinLoadBalancingConfig weightedroundrobin()Returns the value of theweightedroundrobinrecord component.- Returns:
- the value of the
weightedroundrobinrecord component
-
grpc
-