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) |
RoundRobinLoadBalancer(String serviceId,
org.springframework.beans.factory.ObjectProvider<ServiceInstanceSupplier> serviceInstanceSupplier)
Deprecated.
Use
RoundRobinLoadBalancer(ObjectProvider, String)} instead. |
RoundRobinLoadBalancer(String serviceId,
org.springframework.beans.factory.ObjectProvider<ServiceInstanceSupplier> serviceInstanceSupplier,
int seedPosition)
Deprecated.
Use
RoundRobinLoadBalancer(ObjectProvider, String, int)}
instead. |
| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.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, waitchoose@Deprecated public RoundRobinLoadBalancer(String serviceId, org.springframework.beans.factory.ObjectProvider<ServiceInstanceSupplier> serviceInstanceSupplier)
RoundRobinLoadBalancer(ObjectProvider, String)} instead.serviceId - id of the service for which to choose an instanceserviceInstanceSupplier - a provider of ServiceInstanceSupplier that
will be used to get available instancespublic 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 marker@Deprecated public RoundRobinLoadBalancer(String serviceId, org.springframework.beans.factory.ObjectProvider<ServiceInstanceSupplier> serviceInstanceSupplier, int seedPosition)
RoundRobinLoadBalancer(ObjectProvider, String, int)}
instead.serviceId - id of the service for which to choose an instanceserviceInstanceSupplier - a provider of ServiceInstanceSupplier that
will be used to get available instancesseedPosition - Round Robin element position markerpublic reactor.core.publisher.Mono<Response<ServiceInstance>> choose(Request request)
ReactorLoadBalancerchoose in interface ReactiveLoadBalancer<ServiceInstance>choose in interface ReactorLoadBalancer<ServiceInstance>request - - an input requestCopyright © 2021 Pivotal Software, Inc.. All rights reserved.