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 MultiChildLoadBalancer
MultiChildLoadBalancer.AcceptResolvedAddrRetVal, MultiChildLoadBalancer.ChildLbState, MultiChildLoadBalancer.EndpointNested classes/interfaces inherited from class 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 MultiChildLoadBalancer
currentConnectivityState, pickFirstLbProvider, resolvingAddresses -
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 MultiChildLoadBalancer
acceptResolvedAddresses, acceptResolvedAddressesInternal, aggregateState, createChildAddressesMap, getChildLbState, getChildLbStateEag, getChildLbStates, getHelper, getReadyChildren, handleNameResolutionError, shutdown, shutdownRemovedMethods inherited from class 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
-