Search in sources :

Example 6 with ErrorPicker

use of io.grpc.xds.XdsSubchannelPickers.ErrorPicker in project grpc-java by grpc.

the class PriorityLoadBalancer method handleNameResolutionError.

@Override
public void handleNameResolutionError(Status error) {
    logger.log(XdsLogLevel.WARNING, "Received name resolution error: {0}", error);
    boolean gotoTransientFailure = true;
    for (ChildLbState child : children.values()) {
        if (priorityNames.contains(child.priority)) {
            child.lb.handleNameResolutionError(error);
            gotoTransientFailure = false;
        }
    }
    if (gotoTransientFailure) {
        updateOverallState(null, TRANSIENT_FAILURE, new ErrorPicker(error));
    }
}
Also used : ErrorPicker(io.grpc.xds.XdsSubchannelPickers.ErrorPicker)

Aggregations

ErrorPicker (io.grpc.xds.XdsSubchannelPickers.ErrorPicker)6 EquivalentAddressGroup (io.grpc.EquivalentAddressGroup)4 Test (org.junit.Test)4 Helper (io.grpc.LoadBalancer.Helper)3 PolicySelection (io.grpc.internal.ServiceConfigUtil.PolicySelection)3 PriorityLbConfig (io.grpc.xds.PriorityLoadBalancerProvider.PriorityLbConfig)3 PriorityChildConfig (io.grpc.xds.PriorityLoadBalancerProvider.PriorityLbConfig.PriorityChildConfig)3 LoadBalancer (io.grpc.LoadBalancer)2 SubchannelPicker (io.grpc.LoadBalancer.SubchannelPicker)2 PickResult (io.grpc.LoadBalancer.PickResult)1 PickSubchannelArgs (io.grpc.LoadBalancer.PickSubchannelArgs)1 Subchannel (io.grpc.LoadBalancer.Subchannel)1 WeightedChildPicker (io.grpc.xds.WeightedRandomPicker.WeightedChildPicker)1 WeightedPolicySelection (io.grpc.xds.WeightedTargetLoadBalancerProvider.WeightedPolicySelection)1 WeightedTargetConfig (io.grpc.xds.WeightedTargetLoadBalancerProvider.WeightedTargetConfig)1