public class ZookeeperServiceRegistry extends Object implements org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>, org.springframework.beans.factory.SmartInitializingSingleton, Closeable
Modifier and Type | Field and Description |
---|---|
protected org.apache.curator.framework.CuratorFramework |
curator |
protected ZookeeperDiscoveryProperties |
properties |
Constructor and Description |
---|
ZookeeperServiceRegistry(org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> serviceDiscovery) |
Modifier and Type | Method and Description |
---|---|
void |
afterSingletonsInstantiated() |
void |
close() |
void |
deregister(ZookeeperRegistration registration) |
protected org.apache.curator.framework.CuratorFramework |
getCurator()
Deprecated.
|
Object |
getStatus(ZookeeperRegistration registration) |
void |
register(ZookeeperRegistration registration)
TODO: add when ZookeeperServiceDiscovery is removed
One can override this method to provide custom way of registering
ServiceDiscovery |
void |
setStatus(ZookeeperRegistration registration,
String status) |
protected org.apache.curator.framework.CuratorFramework curator
protected ZookeeperDiscoveryProperties properties
public ZookeeperServiceRegistry(org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> serviceDiscovery)
public void register(ZookeeperRegistration registration)
ServiceDiscovery
register
in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
public void deregister(ZookeeperRegistration registration)
deregister
in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
public void afterSingletonsInstantiated()
afterSingletonsInstantiated
in interface org.springframework.beans.factory.SmartInitializingSingleton
public void close()
close
in interface Closeable
close
in interface AutoCloseable
close
in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
public void setStatus(ZookeeperRegistration registration, String status)
setStatus
in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
public Object getStatus(ZookeeperRegistration registration)
getStatus
in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
@Deprecated protected org.apache.curator.framework.CuratorFramework getCurator()
Copyright © 2017 Pivotal Software, Inc.. All rights reserved.