Package io.grpc.util
Class RoundRobinLoadBalancer
java.lang.Object
io.grpc.LoadBalancer
io.grpc.util.MultiChildLoadBalancer
io.grpc.util.RoundRobinLoadBalancer
A
LoadBalancer that provides round-robin load-balancing over the EquivalentAddressGroups from the NameResolver.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classNested classes/interfaces inherited from class io.grpc.util.MultiChildLoadBalancer
MultiChildLoadBalancer.AcceptResolvedAddrRetVal, MultiChildLoadBalancer.ChildLbState, MultiChildLoadBalancer.EndpointNested classes/interfaces inherited from class io.grpc.LoadBalancer
LoadBalancer.CreateSubchannelArgs, LoadBalancer.ErrorPicker, LoadBalancer.Factory, LoadBalancer.FixedResultPicker, LoadBalancer.Helper, LoadBalancer.PickDetailsConsumer, LoadBalancer.PickResult, LoadBalancer.PickSubchannelArgs, LoadBalancer.ResolvedAddresses, LoadBalancer.Subchannel, LoadBalancer.SubchannelPicker, LoadBalancer.SubchannelStateListener -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate LoadBalancer.SubchannelPickerprivate final AtomicIntegerFields inherited from class io.grpc.util.MultiChildLoadBalancer
currentConnectivityState, pickFirstLbProvider, resolvingAddressesFields inherited from class io.grpc.LoadBalancer
ATTR_HEALTH_CHECKING_CONFIG, DISABLE_SUBCHANNEL_RECONNECT_KEY, EMPTY_PICKER, HAS_HEALTH_PRODUCER_LISTENER_KEY, HEALTH_CONSUMER_LISTENER_ARG_KEY, IS_PETIOLE_POLICY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected MultiChildLoadBalancer.ChildLbStatecreateChildLbState(Object key) Override to create an instance of a subclass.private LoadBalancer.SubchannelPickerprivate voidupdateBalancingState(ConnectivityState state, LoadBalancer.SubchannelPicker picker) protected voidUpdates picker with the list of active subchannels (state == READY).Methods inherited from class io.grpc.util.MultiChildLoadBalancer
acceptResolvedAddresses, acceptResolvedAddressesInternal, aggregateState, createChildAddressesMap, getChildLbState, getChildLbStateEag, getChildLbStates, getHelper, getReadyChildren, handleNameResolutionError, shutdown, shutdownRemovedMethods inherited from class io.grpc.LoadBalancer
canHandleEmptyAddressListFromNameResolution, handleResolvedAddresses, handleSubchannelState, requestConnection
-
Field Details
-
sequence
-
currentPicker
-
-
Constructor Details
-
RoundRobinLoadBalancer
-
-
Method Details
-
updateOverallBalancingState
protected void updateOverallBalancingState()Updates picker with the list of active subchannels (state == READY).- Specified by:
updateOverallBalancingStatein classMultiChildLoadBalancer
-
updateBalancingState
-
createReadyPicker
private LoadBalancer.SubchannelPicker createReadyPicker(Collection<MultiChildLoadBalancer.ChildLbState> children) -
createChildLbState
Description copied from class:MultiChildLoadBalancerOverride to create an instance of a subclass.- Overrides:
createChildLbStatein classMultiChildLoadBalancer
-