Package io.grpc
Class ManagedChannelRegistry.ManagedChannelPriorityAccessor
- java.lang.Object
-
- io.grpc.ManagedChannelRegistry.ManagedChannelPriorityAccessor
-
- All Implemented Interfaces:
ServiceProviders.PriorityAccessor<ManagedChannelProvider>
- Enclosing class:
- ManagedChannelRegistry
private static final class ManagedChannelRegistry.ManagedChannelPriorityAccessor extends java.lang.Object implements ServiceProviders.PriorityAccessor<ManagedChannelProvider>
-
-
Constructor Summary
Constructors Modifier Constructor Description privateManagedChannelPriorityAccessor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetPriority(ManagedChannelProvider provider)A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.booleanisAvailable(ManagedChannelProvider provider)Checks this provider is available for use, taking the current environment into consideration.
-
-
-
Method Detail
-
isAvailable
public boolean isAvailable(ManagedChannelProvider provider)
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<ManagedChannelProvider>
-
getPriority
public int getPriority(ManagedChannelProvider provider)
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<ManagedChannelProvider>
-
-