Class WeightedServiceInstanceListSupplier
java.lang.Object
org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
org.springframework.cloud.loadbalancer.core.WeightedServiceInstanceListSupplier
- All Implemented Interfaces:
Supplier<reactor.core.publisher.Flux<List<org.springframework.cloud.client.ServiceInstance>>>, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, SelectedInstanceCallback, ServiceInstanceListSupplier
A
ServiceInstanceListSupplier implementation that uses weights to expand the
instances provided by delegate.- Author:
- Zhuozhi Ji, Olga Maciaszek-Sharma
-
Field Summary
Fields inherited from class DelegatingServiceInstanceListSupplier
delegate -
Constructor Summary
ConstructorsConstructorDescriptionWeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory) WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, WeightFunction weightFunction) WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, WeightFunction weightFunction, org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory) -
Method Summary
Methods inherited from class DelegatingServiceInstanceListSupplier
afterPropertiesSet, destroy, getDelegate, getServiceId, selectedServiceInstance
-
Constructor Details
-
WeightedServiceInstanceListSupplier
-
WeightedServiceInstanceListSupplier
public WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, WeightFunction weightFunction) -
WeightedServiceInstanceListSupplier
public WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory) -
WeightedServiceInstanceListSupplier
public WeightedServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, WeightFunction weightFunction, org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory)
-
-
Method Details
-
get
-
get
public reactor.core.publisher.Flux<List<org.springframework.cloud.client.ServiceInstance>> get(org.springframework.cloud.client.loadbalancer.Request request)
-