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<org.springframework.cloud.client.ServiceInstance>>>, org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, SelectedInstanceCallback, ServiceInstanceListSupplier

public class ZonePreferenceServiceInstanceListSupplier extends DelegatingServiceInstanceListSupplier
An implementation of ServiceInstanceListSupplier that filters instances retrieved by the delegate by zone. The zone is retrieved from the spring.cloud.loadbalancer.zone property. 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
  • Constructor Details

    • ZonePreferenceServiceInstanceListSupplier

      public ZonePreferenceServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, LoadBalancerZoneConfig zoneConfig)
    • ZonePreferenceServiceInstanceListSupplier

      public ZonePreferenceServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, LoadBalancerZoneConfig zoneConfig, org.springframework.cloud.client.loadbalancer.reactive.ReactiveLoadBalancer.Factory<org.springframework.cloud.client.ServiceInstance> loadBalancerClientFactory)
  • Method Details

    • get

      public reactor.core.publisher.Flux<List<org.springframework.cloud.client.ServiceInstance>> get()
    • get

      public reactor.core.publisher.Flux<List<org.springframework.cloud.client.ServiceInstance>> get(org.springframework.cloud.client.loadbalancer.Request request)