Package io.airlift.discovery.client
Class CachingServiceSelector
- java.lang.Object
-
- io.airlift.discovery.client.CachingServiceSelector
-
- All Implemented Interfaces:
ServiceSelector
public class CachingServiceSelector extends Object implements ServiceSelector
-
-
Constructor Summary
Constructors Constructor Description CachingServiceSelector(String type, ServiceSelectorConfig selectorConfig, DiscoveryLookupClient lookupClient, ScheduledExecutorService executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetPool()StringgetType()com.google.common.util.concurrent.ListenableFuture<List<ServiceDescriptor>>refresh()List<ServiceDescriptor>selectAllServices()voidstart()
-
-
-
Constructor Detail
-
CachingServiceSelector
public CachingServiceSelector(String type, ServiceSelectorConfig selectorConfig, DiscoveryLookupClient lookupClient, ScheduledExecutorService executor)
-
-
Method Detail
-
start
@PostConstruct public void start()
-
getType
public String getType()
- Specified by:
getTypein interfaceServiceSelector
-
getPool
public String getPool()
- Specified by:
getPoolin interfaceServiceSelector
-
selectAllServices
public List<ServiceDescriptor> selectAllServices()
- Specified by:
selectAllServicesin interfaceServiceSelector
-
refresh
public com.google.common.util.concurrent.ListenableFuture<List<ServiceDescriptor>> refresh()
- Specified by:
refreshin interfaceServiceSelector
-
-