@Internal public final class RlsLoadBalancerProvider extends LoadBalancerProvider
LoadBalancerRegistry.getProvider(java.lang.String) with the name "rls-experimental".| Constructor and Description |
|---|
RlsLoadBalancerProvider() |
| Modifier and Type | Method and Description |
|---|---|
String |
getPolicyName()
Returns the load-balancing policy name associated with this provider, which makes it selectable
via
LoadBalancerRegistry.getProvider(java.lang.String). |
int |
getPriority()
A priority, from 0 to 10 that this provider should be used, taking the current environment into
consideration.
|
boolean |
isAvailable()
Whether this provider is available for use, taking the current environment into consideration.
|
LoadBalancer |
newLoadBalancer(LoadBalancer.Helper helper)
Creates a
LoadBalancer that will be used inside a channel. |
NameResolver.ConfigOrError |
parseLoadBalancingPolicyConfig(Map<String,?> rawLoadBalancingConfigPolicy)
Parses the config for the Load Balancing policy unpacked from the service config.
|
equals, hashCode, toStringpublic boolean isAvailable()
LoadBalancerProviderfalse, LoadBalancer.Factory.newLoadBalancer(io.grpc.LoadBalancer.Helper) is not safe to be called.isAvailable in class LoadBalancerProviderpublic int getPriority()
LoadBalancerProvidergetPriority in class LoadBalancerProviderpublic String getPolicyName()
LoadBalancerProviderLoadBalancerRegistry.getProvider(java.lang.String). This is called only when the class is loaded. It
shouldn't change, and there is no point doing so.
The policy name should consist of only lower case letters letters, underscore and digits, and can only start with letters.
getPolicyName in class LoadBalancerProviderpublic LoadBalancer newLoadBalancer(LoadBalancer.Helper helper)
LoadBalancer.FactoryLoadBalancer that will be used inside a channel.newLoadBalancer in class LoadBalancer.Factorypublic NameResolver.ConfigOrError parseLoadBalancingPolicyConfig(Map<String,?> rawLoadBalancingConfigPolicy)
LoadBalancerProviderNameResolver.ConfigOrError which contains either the successfully parsed config, or the
Status representing the failure to parse. Implementations are expected to not throw
exceptions but return a Status representing the failure. If successful, the load balancing
policy config should be immutable.parseLoadBalancingPolicyConfig in class LoadBalancerProviderrawLoadBalancingConfigPolicy - The Map representation of the load balancing
policy choice.