what-the-bank/sources/io/grpc/util/SecretRoundRobinLoadBalance...

43 lines
1.3 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package io.grpc.util;
import io.grpc.LoadBalancer;
import io.grpc.LoadBalancerProvider;
import io.grpc.NameResolver;
import java.util.Map;
/* loaded from: classes6.dex */
final class SecretRoundRobinLoadBalancerProvider {
private SecretRoundRobinLoadBalancerProvider() {
}
/* loaded from: classes6.dex */
public static final class Provider 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 RoundRobinLoadBalancer(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 "round_robin";
}
}
}