@Internal public final class OutlierDetectionLoadBalancerProvider extends LoadBalancerProvider
| Constructor and Description |
|---|
OutlierDetectionLoadBalancerProvider() |
| 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,?> rawConfig)
Parses the config for the Load Balancing policy unpacked from the service config.
|
equals, hashCode, toStringpublic OutlierDetectionLoadBalancerProvider()
public LoadBalancer newLoadBalancer(LoadBalancer.Helper helper)
LoadBalancer.FactoryLoadBalancer that will be used inside a channel.newLoadBalancer in class LoadBalancer.Factorypublic 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 NameResolver.ConfigOrError parseLoadBalancingPolicyConfig(Map<String,?> rawConfig)
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 LoadBalancerProviderrawConfig - The Map representation of the load balancing
policy choice.