public class ZooKeeperDiscovery extends com.google.common.cache.CacheLoader<String,org.apache.curator.x.discovery.ServiceProvider<Payload>> implements ExtendedDiscovery, io.dropwizard.lifecycle.Managed, com.google.common.cache.RemovalListener<String,org.apache.curator.x.discovery.ServiceProvider<Payload>>
| Constructor and Description | 
|---|
ZooKeeperDiscovery(org.apache.curator.framework.CuratorFramework curator,
                  ZooKeeperDiscoveryFactory factory,
                  SoaInfo soaInfo,
                  io.dropwizard.setup.Environment environment,
                  Collection<String> instanceDeploymentGroups)  | 
| Modifier and Type | Method and Description | 
|---|---|
Collection<DiscoveryInstance> | 
getAllInstances(String serviceName)  | 
DiscoveryInstance | 
getInstance(String serviceName)  | 
Collection<String> | 
getServiceNames()  | 
org.apache.curator.x.discovery.ServiceProvider<Payload> | 
load(String serviceName)  | 
void | 
noteError(String serviceName,
         DiscoveryInstance errorInstance,
         int statusCode,
         Throwable exception)  | 
void | 
noteSuccess(String serviceName,
           DiscoveryInstance instance,
           int statusCode)  | 
void | 
onRemoval(com.google.common.cache.RemovalNotification<String,org.apache.curator.x.discovery.ServiceProvider<Payload>> notification)  | 
Collection<DiscoveryInstance> | 
queryForAllInstances(String serviceName)  | 
Collection<String> | 
queryForServiceNames()  | 
void | 
setForcedState(String serviceName,
              String instanceId,
              ForcedState forcedState)  | 
void | 
setHealthyState(HealthyState newHealthyState)  | 
void | 
setMetaData(Map<String,String> newMetaData)  | 
void | 
start()  | 
void | 
stop()  | 
public ZooKeeperDiscovery(org.apache.curator.framework.CuratorFramework curator,
                          ZooKeeperDiscoveryFactory factory,
                          SoaInfo soaInfo,
                          io.dropwizard.setup.Environment environment,
                          Collection<String> instanceDeploymentGroups)
public Collection<String> getServiceNames()
getServiceNames in interface Discoverypublic Collection<String> queryForServiceNames()
queryForServiceNames in interface ExtendedDiscoverypublic void setHealthyState(HealthyState newHealthyState)
setHealthyState in interface Discoverypublic void setMetaData(Map<String,String> newMetaData)
setMetaData in interface Discoverypublic void setForcedState(String serviceName, String instanceId, ForcedState forcedState)
setForcedState in interface ExtendedDiscoverypublic org.apache.curator.x.discovery.ServiceProvider<Payload> load(String serviceName) throws Exception
public void onRemoval(com.google.common.cache.RemovalNotification<String,org.apache.curator.x.discovery.ServiceProvider<Payload>> notification)
public Collection<DiscoveryInstance> queryForAllInstances(String serviceName)
queryForAllInstances in interface ExtendedDiscoverypublic Collection<DiscoveryInstance> getAllInstances(String serviceName)
getAllInstances in interface Discoverypublic DiscoveryInstance getInstance(String serviceName)
getInstance in interface Discoverypublic void noteError(String serviceName, DiscoveryInstance errorInstance, int statusCode, Throwable exception)
public void noteSuccess(String serviceName, DiscoveryInstance instance, int statusCode)
noteSuccess in interface Discoverypublic void start()
           throws Exception
start in interface io.dropwizard.lifecycle.ManagedExceptionCopyright © 2014–2016 Soabase. All rights reserved.