public class ZookeeperServiceDiscovery extends Object implements org.springframework.context.ApplicationContextAware
ServiceDiscovery
and ServiceInstance.| Constructor and Description |
|---|
ZookeeperServiceDiscovery(org.apache.curator.framework.CuratorFramework curator,
ZookeeperDiscoveryProperties properties,
org.apache.curator.x.discovery.details.InstanceSerializer<ZookeeperInstance> instanceSerializer) |
| Modifier and Type | Method and Description |
|---|---|
void |
build() |
protected void |
configureServiceDiscovery(AtomicReference<org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance>> serviceDiscovery,
org.apache.curator.framework.CuratorFramework curator,
ZookeeperDiscoveryProperties properties,
org.apache.curator.x.discovery.details.InstanceSerializer<ZookeeperInstance> instanceSerializer,
AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> serviceInstance)
One can override this method to provide custom way of registering
ServiceDiscovery |
protected void |
configureServiceInstance(AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> serviceInstance,
String appName,
org.springframework.context.ApplicationContext context,
AtomicInteger port,
String host,
org.apache.curator.x.discovery.UriSpec uriSpec)
One can override this method to provide custom way of registering a service
instance (e.g.
|
protected AtomicBoolean |
getBuilt() |
protected org.apache.curator.framework.CuratorFramework |
getCurator() |
int |
getPort() |
org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> |
getServiceDiscovery() |
protected AtomicReference<org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance>> |
getServiceDiscoveryRef() |
org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> |
getServiceInstance() |
protected AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> |
getServiceInstanceRef() |
void |
setApplicationContext(org.springframework.context.ApplicationContext context) |
void |
setPort(int port) |
public ZookeeperServiceDiscovery(org.apache.curator.framework.CuratorFramework curator,
ZookeeperDiscoveryProperties properties,
org.apache.curator.x.discovery.details.InstanceSerializer<ZookeeperInstance> instanceSerializer)
public int getPort()
public void setPort(int port)
public org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> getServiceInstance()
public org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> getServiceDiscovery()
public void setApplicationContext(org.springframework.context.ApplicationContext context)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void build()
protected void configureServiceInstance(AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> serviceInstance, String appName, org.springframework.context.ApplicationContext context, AtomicInteger port, String host, org.apache.curator.x.discovery.UriSpec uriSpec)
protected void configureServiceDiscovery(AtomicReference<org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance>> serviceDiscovery, org.apache.curator.framework.CuratorFramework curator, ZookeeperDiscoveryProperties properties, org.apache.curator.x.discovery.details.InstanceSerializer<ZookeeperInstance> instanceSerializer, AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> serviceInstance)
ServiceDiscoveryprotected AtomicReference<org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance>> getServiceDiscoveryRef()
protected AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> getServiceInstanceRef()
protected AtomicBoolean getBuilt()
protected org.apache.curator.framework.CuratorFramework getCurator()
Copyright © 2016 Pivotal Software, Inc.. All rights reserved.