ZookeeperServiceRegistry
and ServiceInstanceRegistration. Remove in Edgware@Deprecated public class ZookeeperServiceDiscovery extends Object implements ZookeeperRegistration, 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)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
build()
Deprecated.
Builds Service Instance - needs to be used when you want to register your application
in Zookeeper
|
void |
buildServiceDiscovery()
Deprecated.
Builds Service Discovery - needs to be used if you want to use Zookeeper as a client application.
|
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)
Deprecated.
One can override this method to provide custom way of registering
ServiceDiscovery |
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)
Deprecated.
One can override this method to provide custom way of registering a service
instance (e.g.
|
protected AtomicBoolean |
getBuilt()
Deprecated.
|
org.apache.curator.framework.CuratorFramework |
getCurator()
Deprecated.
|
int |
getPort()
Deprecated.
|
AtomicReference<org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance>> |
getServiceDiscoveryRef()
Deprecated.
|
String |
getServiceId()
Deprecated.
|
org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> |
getServiceInstance()
Deprecated.
|
AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> |
getServiceInstanceRef()
Deprecated.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext context)
Deprecated.
|
void |
setPort(int port)
Deprecated.
|
void |
setRegister(boolean register)
Deprecated.
Override the register property, useful when auto-register == false
|
public ZookeeperServiceDiscovery(org.apache.curator.framework.CuratorFramework curator,
ZookeeperDiscoveryProperties properties,
org.apache.curator.x.discovery.details.InstanceSerializer<ZookeeperInstance> instanceSerializer)
public int getPort()
getPort in interface ZookeeperRegistrationpublic void setPort(int port)
setPort in interface ZookeeperRegistrationpublic void setRegister(boolean register)
register - public void setApplicationContext(org.springframework.context.ApplicationContext context)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic String getServiceId()
getServiceId in interface org.springframework.cloud.client.serviceregistry.Registrationpublic void build()
public void buildServiceDiscovery()
public 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)
public 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)
ServiceDiscoverypublic org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance> getServiceInstance()
getServiceInstance in interface ZookeeperRegistrationpublic AtomicReference<org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance>> getServiceDiscoveryRef()
public AtomicReference<org.apache.curator.x.discovery.ServiceInstance<ZookeeperInstance>> getServiceInstanceRef()
protected AtomicBoolean getBuilt()
public org.apache.curator.framework.CuratorFramework getCurator()
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.