@ExperimentalApi(value="https://github.com/grpc/grpc-java/issues/1771") public final class PickFirstBalancerFactory extends LoadBalancer.Factory
LoadBalancer that provides no load balancing mechanism over the
addresses from the NameResolver. The channel's default behavior
(currently pick-first) is used for all addresses found.| Modifier and Type | Method and Description |
|---|---|
static PickFirstBalancerFactory |
getInstance() |
<T> LoadBalancer<T> |
newLoadBalancer(String serviceName,
TransportManager<T> tm)
Creates a
LoadBalancer that will be used inside a channel. |
public static PickFirstBalancerFactory getInstance()
public <T> LoadBalancer<T> newLoadBalancer(String serviceName, TransportManager<T> tm)
LoadBalancer.FactoryLoadBalancer that will be used inside a channel.newLoadBalancer in class LoadBalancer.FactoryserviceName - the DNS-style service name, which is also the authoritytm - the interface where an LoadBalancer implementation gets connected
transports from