Class CachingServiceInstanceListSupplier
- java.lang.Object
-
- org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
-
- org.springframework.cloud.loadbalancer.core.CachingServiceInstanceListSupplier
-
- All Implemented Interfaces:
Supplier<reactor.core.publisher.Flux<List<ServiceInstance>>>,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,ServiceInstanceListSupplier
public class CachingServiceInstanceListSupplier extends DelegatingServiceInstanceListSupplier
AServiceInstanceListSupplierimplementation that tries retrievingServiceInstanceobjects from cache; if none found, retrieves instances usingDiscoveryClientServiceInstanceListSupplier.- Since:
- 2.2.0
- Author:
- Spencer Gibb, Olga Maciaszek-Sharma
-
-
Field Summary
Fields Modifier and Type Field Description static StringSERVICE_INSTANCE_CACHE_NAMEName of the service cache instance.-
Fields inherited from class org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
delegate
-
-
Constructor Summary
Constructors Constructor Description CachingServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, org.springframework.cache.CacheManager cacheManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Flux<List<ServiceInstance>>get()-
Methods inherited from class org.springframework.cloud.loadbalancer.core.DelegatingServiceInstanceListSupplier
afterPropertiesSet, destroy, getDelegate, getServiceId
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.springframework.cloud.loadbalancer.core.ServiceInstanceListSupplier
get
-
-
-
-
Field Detail
-
SERVICE_INSTANCE_CACHE_NAME
public static final String SERVICE_INSTANCE_CACHE_NAME
Name of the service cache instance.
-
-
Constructor Detail
-
CachingServiceInstanceListSupplier
public CachingServiceInstanceListSupplier(ServiceInstanceListSupplier delegate, org.springframework.cache.CacheManager cacheManager)
-
-
Method Detail
-
get
public reactor.core.publisher.Flux<List<ServiceInstance>> get()
-
-