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 Details

  • Constructor Details

    • ZookeeperServiceRegistry

      public ZookeeperServiceRegistry(org.apache.curator.x.discovery.ServiceDiscovery<ZookeeperInstance> serviceDiscovery)
  • Method Details

    • register

      public void register(ZookeeperRegistration registration)
      TODO: add when ZookeeperServiceDiscovery is removed One can override this method to provide custom way of registering ServiceDiscovery
      Specified by:
      register in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
    • deregister

      public void deregister(ZookeeperRegistration registration)
      Specified by:
      deregister in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
    • afterSingletonsInstantiated

      public void afterSingletonsInstantiated()
      Specified by:
      afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingleton
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
    • setStatus

      public void setStatus(ZookeeperRegistration registration, String status)
      Specified by:
      setStatus in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
    • getStatus

      public Object getStatus(ZookeeperRegistration registration)
      Specified by:
      getStatus in interface org.springframework.cloud.client.serviceregistry.ServiceRegistry<ZookeeperRegistration>
    • getCurator

      @Deprecated protected org.apache.curator.framework.CuratorFramework getCurator()
      Deprecated.