Package io.grpc

Interface ServiceProviders.PriorityAccessor<T>

All Known Subinterfaces:
InternalServiceProviders.PriorityAccessor<T>
All Known Implementing Classes:
LoadBalancerRegistry.LoadBalancerPriorityAccessor, ManagedChannelRegistry.ManagedChannelPriorityAccessor, NameResolverRegistry.NameResolverPriorityAccessor, ServerRegistry.ServerPriorityAccessor
Enclosing class:
ServiceProviders

public static interface ServiceProviders.PriorityAccessor<T>
An interface that allows us to get priority information about a provider.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getPriority(T provider)
    A priority, from 0 to 10 that this provider should be used, taking the current environment into consideration.
    boolean
    isAvailable(T provider)
    Checks this provider is available for use, taking the current environment into consideration.
  • Method Details

    • isAvailable

      boolean isAvailable(T provider)
      Checks this provider is available for use, taking the current environment into consideration. If false, no other methods are safe to be called.
    • getPriority

      int getPriority(T provider)
      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.