Package io.grpc
Class NameResolverRegistry.NameResolverPriorityAccessor
java.lang.Object
io.grpc.NameResolverRegistry.NameResolverPriorityAccessor
- All Implemented Interfaces:
ServiceProviders.PriorityAccessor<NameResolverProvider>
- Enclosing class:
NameResolverRegistry
private static final class NameResolverRegistry.NameResolverPriorityAccessor
extends Object
implements ServiceProviders.PriorityAccessor<NameResolverProvider>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getPriority
(NameResolverProvider provider) A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.boolean
isAvailable
(NameResolverProvider provider) Checks this provider is available for use, taking the current environment into consideration.
-
Constructor Details
-
NameResolverPriorityAccessor
private NameResolverPriorityAccessor()
-
-
Method Details
-
isAvailable
Description copied from interface:ServiceProviders.PriorityAccessor
Checks this provider is available for use, taking the current environment into consideration. Iffalse
, no other methods are safe to be called.- Specified by:
isAvailable
in interfaceServiceProviders.PriorityAccessor<NameResolverProvider>
-
getPriority
Description copied from interface:ServiceProviders.PriorityAccessor
A 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:
getPriority
in interfaceServiceProviders.PriorityAccessor<NameResolverProvider>
-