Class ZonePreferenceServiceInstanceListSupplier
- java.lang.Object
-
- org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
-
- org.springframework.cloud.loadbalancer.core.ZonePreferenceServiceInstanceListSupplier
-
- All Implemented Interfaces:
Supplier<reactor.core.publisher.Flux<List<ServiceInstance>>>,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,ServiceInstanceListSupplier
public class ZonePreferenceServiceInstanceListSupplier extends DelegatingServiceInstanceListSupplier
An implementation ofServiceInstanceListSupplierthat filters instances retrieved by the delegate by zone. The zone is retrieved from thespring.cloud.loadbalancer.zoneproperty. If the zone is not set or no instances are found for the requested zone, all instances retrieved by the delegate are returned.- Since:
- 2.2.1
- Author:
- Olga Maciaszek-Sharma
-
-
Field Summary
-
Fields inherited from class org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
delegate
-
-
Constructor Summary
Constructors Constructor Description ZonePreferenceServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, LoadBalancerZoneConfig zoneConfig)ZonePreferenceServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, LoadBalancerZoneConfig zoneConfig, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerClientFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Flux<List<ServiceInstance>>get()reactor.core.publisher.Flux<List<ServiceInstance>>get(Request request)-
Methods inherited from class org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
afterPropertiesSet, destroy, getDelegate, getServiceId
-
-
-
-
Constructor Detail
-
ZonePreferenceServiceInstanceListSupplier
public ZonePreferenceServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, LoadBalancerZoneConfig zoneConfig)
-
ZonePreferenceServiceInstanceListSupplier
public ZonePreferenceServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, LoadBalancerZoneConfig zoneConfig, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerClientFactory)
-
-
Method Detail
-
get
public reactor.core.publisher.Flux<List<ServiceInstance>> get()
-
get
public reactor.core.publisher.Flux<List<ServiceInstance>> get(Request request)
-
-