Package io.grpc
Class LoadBalancerRegistry.LoadBalancerPriorityAccessor
java.lang.Object
io.grpc.LoadBalancerRegistry.LoadBalancerPriorityAccessor
- All Implemented Interfaces:
ServiceProviders.PriorityAccessor<LoadBalancerProvider>
- Enclosing class:
LoadBalancerRegistry
private static final class LoadBalancerRegistry.LoadBalancerPriorityAccessor
extends Object
implements ServiceProviders.PriorityAccessor<LoadBalancerProvider>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetPriority(LoadBalancerProvider provider) A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.booleanisAvailable(LoadBalancerProvider provider) Checks this provider is available for use, taking the current environment into consideration.
-
Constructor Details
-
LoadBalancerPriorityAccessor
LoadBalancerPriorityAccessor()
-
-
Method Details
-
isAvailable
Description copied from interface:ServiceProviders.PriorityAccessorChecks this provider is available for use, taking the current environment into consideration. Iffalse, no other methods are safe to be called.- Specified by:
isAvailablein interfaceServiceProviders.PriorityAccessor<LoadBalancerProvider>
-
getPriority
Description copied from interface:ServiceProviders.PriorityAccessorA priority, from 0 to 10 that this provider should be used, taking the current environment into consideration. 5 should be considered the default, and then tweaked based on environment detection. A priority of 0 does not imply that the provider wouldn't work; just that it should be last in line.- Specified by:
getPriorityin interfaceServiceProviders.PriorityAccessor<LoadBalancerProvider>
-