public class RoundRobinLoadBalancer extends Object implements ReactorServiceInstanceLoadBalancer
ReactorServiceInstanceLoadBalancer.ReactiveLoadBalancer.Factory<T>REQUEST| Constructor and Description |
|---|
RoundRobinLoadBalancer(org.springframework.beans.factory.ObjectProvider<ServiceInstanceListSupplier> serviceInstanceListSupplierProvider,
String serviceId) |
RoundRobinLoadBalancer(org.springframework.beans.factory.ObjectProvider<ServiceInstanceListSupplier> serviceInstanceListSupplierProvider,
String serviceId,
int seedPosition) |
| Modifier and Type | Method and Description |
|---|---|
Mono<Response<ServiceInstance>> |
choose(Request request)
Choose the next server based on the load balancing algorithm.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitchoosepublic RoundRobinLoadBalancer(org.springframework.beans.factory.ObjectProvider<ServiceInstanceListSupplier> serviceInstanceListSupplierProvider, String serviceId)
serviceInstanceListSupplierProvider - a provider of
ServiceInstanceListSupplier that will be used to get available instancesserviceId - id of the service for which to choose an instancepublic RoundRobinLoadBalancer(org.springframework.beans.factory.ObjectProvider<ServiceInstanceListSupplier> serviceInstanceListSupplierProvider, String serviceId, int seedPosition)
serviceInstanceListSupplierProvider - a provider of
ServiceInstanceListSupplier that will be used to get available instancesserviceId - id of the service for which to choose an instanceseedPosition - Round Robin element position markerpublic Mono<Response<ServiceInstance>> choose(Request request)
ReactorLoadBalancerchoose in interface ReactiveLoadBalancer<ServiceInstance>choose in interface ReactorLoadBalancer<ServiceInstance>request - - an input requestCopyright © 2020 Pivotal Software, Inc.. All rights reserved.