Class ZookeeperServiceRegistry
java.lang.Object
org.springframework.cloud.zookeeper.serviceregistry.ZookeeperServiceRegistry
- All Implemented Interfaces:
Closeable,AutoCloseable,org.springframework.beans.factory.SmartInitializingSingleton,org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
public class ZookeeperServiceRegistry
extends Object
implements org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>, org.springframework.beans.factory.SmartInitializingSingleton, Closeable
- Author:
- Spencer Gibb
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.apache.curator.framework.CuratorFrameworkprotected ZookeeperDiscoveryProperties -
Constructor Summary
ConstructorsConstructorDescriptionZookeeperServiceRegistry(org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> serviceDiscovery) -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voidderegister(ZookeeperRegistration registration) protected org.apache.curator.framework.CuratorFrameworkDeprecated.getStatus(ZookeeperRegistration registration) voidregister(ZookeeperRegistration registration) TODO: add when ZookeeperServiceDiscovery is removed One can override this method to provide custom way of registeringServiceDiscoveryvoidsetStatus(ZookeeperRegistration registration, String status)
-
Field Details
-
curator
protected org.apache.curator.framework.CuratorFramework curator -
properties
-
-
Constructor Details
-
ZookeeperServiceRegistry
public ZookeeperServiceRegistry(org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> serviceDiscovery)
-
-
Method Details
-
register
TODO: add when ZookeeperServiceDiscovery is removed One can override this method to provide custom way of registeringServiceDiscovery- Specified by:
registerin interfaceorg.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
-
deregister
- Specified by:
deregisterin interfaceorg.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
-
afterSingletonsInstantiated
public void afterSingletonsInstantiated()- Specified by:
afterSingletonsInstantiatedin interfaceorg.springframework.beans.factory.SmartInitializingSingleton
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
-
setStatus
- Specified by:
setStatusin interfaceorg.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
-
getStatus
- Specified by:
getStatusin interfaceorg.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
-
getCurator
Deprecated.
-