what-the-bank/sources/io/grpc/internal/PickFirstLoadBalancerProvid...

37 lines
1.1 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package io.grpc.internal;
import io.grpc.LoadBalancer;
import io.grpc.LoadBalancerProvider;
import io.grpc.NameResolver;
import java.util.Map;
/* loaded from: classes6.dex */
public final class PickFirstLoadBalancerProvider extends LoadBalancerProvider {
private static final String NO_CONFIG = "no service config";
@Override // io.grpc.LoadBalancerProvider
public final int getPriority() {
return 5;
}
@Override // io.grpc.LoadBalancerProvider
public final boolean isAvailable() {
return true;
}
@Override // io.grpc.LoadBalancer.Factory
public final LoadBalancer newLoadBalancer(LoadBalancer.Helper helper) {
return new PickFirstLoadBalancer(helper);
}
@Override // io.grpc.LoadBalancerProvider
public final NameResolver.ConfigOrError parseLoadBalancingPolicyConfig(Map<String, ?> map) {
return NameResolver.ConfigOrError.fromConfig(NO_CONFIG);
}
@Override // io.grpc.LoadBalancerProvider
public final String getPolicyName() {
return GrpcUtil.DEFAULT_LB_POLICY;
}
}