public class ServiceHealthCache extends ConsulCache<ServiceHealthKey,ServiceHealth>
ConsulCache.CallbackConsumer<V>, ConsulCache.Listener<K,V>| Modifier and Type | Method and Description |
|---|---|
static ServiceHealthCache |
newCache(HealthClient healthClient,
String serviceName) |
static ServiceHealthCache |
newCache(HealthClient healthClient,
String serviceName,
boolean passing,
CatalogOptions catalogOptions,
int watchSeconds)
Factory method to construct a string/
ServiceHealth map for a particular service. |
addListener, awaitInitialized, getMap, getState, removeListener, start, stop, watchParamspublic static ServiceHealthCache newCache(HealthClient healthClient, String serviceName, boolean passing, CatalogOptions catalogOptions, int watchSeconds)
ServiceHealth map for a particular service.
Keys will be a HostAndPort object made up of the service's address/port combohealthClient - the HealthClientserviceName - the name of the servicepassing - include only passing services?public static ServiceHealthCache newCache(HealthClient healthClient, String serviceName)
Copyright © 2016. All rights reserved.