@FunctionalInterface public interface LoadBalancer
Modifier and Type | Method and Description |
---|---|
static LoadBalancer |
empty() |
static LoadBalancer |
fixed(URL url)
A
LoadBalancer that does no load balancing and always hits the given URL. |
default Publisher<ServiceInstance> |
select() |
Publisher<ServiceInstance> |
select(Object discriminator) |
Publisher<ServiceInstance> select(@Nullable Object discriminator)
discriminator
- An object used to discriminate the server to select. Usually the service IDServiceInstance
default Publisher<ServiceInstance> select()
ServiceInstance
static LoadBalancer fixed(URL url)
LoadBalancer
that does no load balancing and always hits the given URL.url
- The URLLoadBalancer
static LoadBalancer empty()