Class LbPolicyConfiguration.ChildPolicyWrapper.ChildPolicyReportingHelper
- Enclosing class:
LbPolicyConfiguration.ChildPolicyWrapper
LoadBalancer.Helper maintains status of LbPolicyConfiguration.ChildPolicyWrapper when LoadBalancer.Subchannel status changed. This helper is used between child
policy and parent load-balancer where each picker in child policy is governed by a governing
picker (RlsPicker). The governing picker will be reported back to the parent load-balancer.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChildLoadBalancerHelperprivate final LbPolicyConfiguration.ChildLbStatusListener -
Constructor Summary
ConstructorsConstructorDescriptionChildPolicyReportingHelper(ChildLoadBalancerHelper.ChildLoadBalancerHelperProvider childHelperProvider, LbPolicyConfiguration.ChildLbStatusListener listener) -
Method Summary
Modifier and TypeMethodDescriptionprotected LoadBalancer.Helperdelegate()Returns the underlying helper.voidupdateBalancingState(ConnectivityState newState, LoadBalancer.SubchannelPicker newPicker) Set a new state with a new picker to the channel.Methods inherited from class ForwardingLoadBalancerHelper
createOobChannel, createOobChannel, createResolvingOobChannel, createResolvingOobChannelBuilder, createResolvingOobChannelBuilder, createSubchannel, getAuthority, getChannelCredentials, getChannelLogger, getChannelTarget, getMetricRecorder, getNameResolverArgs, getNameResolverRegistry, getScheduledExecutorService, getSynchronizationContext, getUnsafeChannelCredentials, ignoreRefreshNameResolutionCheck, refreshNameResolution, toString, updateOobChannelAddresses, updateOobChannelAddresses
-
Field Details
-
delegate
-
listener
-
-
Constructor Details
-
ChildPolicyReportingHelper
ChildPolicyReportingHelper(ChildLoadBalancerHelper.ChildLoadBalancerHelperProvider childHelperProvider, LbPolicyConfiguration.ChildLbStatusListener listener)
-
-
Method Details
-
delegate
Description copied from class:ForwardingLoadBalancerHelperReturns the underlying helper.- Specified by:
delegatein classForwardingLoadBalancerHelper
-
updateBalancingState
public void updateBalancingState(ConnectivityState newState, LoadBalancer.SubchannelPicker newPicker) Description copied from class:LoadBalancer.HelperSet a new state with a new picker to the channel.When a new picker is provided via
updateBalancingState(), the channel will apply the picker on all buffered RPCs, by callingLoadBalancer.SubchannelPicker.pickSubchannel(LoadBalancer.PickSubchannelArgs).The channel will hold the picker and use it for all RPCs, until
updateBalancingState()is called again and a new picker replaces the old one. IfupdateBalancingState()has never been called, the channel will buffer all RPCs until a picker is provided.It should be called from the Synchronization Context. Currently will log a warning if violated. It will become an exception eventually. See #5015 for the background.
The passed state will be the channel's new state. The SHUTDOWN state should not be passed and its behavior is undefined.
- Overrides:
updateBalancingStatein classForwardingLoadBalancerHelper
-