Package com.networknt.zookeeper
Class ZooKeeperRegistry
- java.lang.Object
-
- com.networknt.registry.support.FailbackRegistry
-
- com.networknt.registry.support.command.CommandFailbackRegistry
-
- com.networknt.zookeeper.ZooKeeperRegistry
-
- All Implemented Interfaces:
DiscoveryService,Registry,RegistryService
public class ZooKeeperRegistry extends CommandFailbackRegistry
The ZooKeeper Registry implementation.
-
-
Field Summary
Fields Modifier and Type Field Description protected StringregistryClassName
-
Constructor Summary
Constructors Constructor Description ZooKeeperRegistry(URL url, ZooKeeperClient client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidavailable(URL arg0)protected List<URL>discoverService(URL url)protected voiddoAvailable(URL url)protected voiddoRegister(URL url)protected voiddoUnavailable(URL url)protected voiddoUnregister(URL url)Collection<URL>getRegisteredServiceUrls()ConcurrentHashMap<URL,ConcurrentHashMap<ServiceListener,org.I0Itec.zkclient.IZkChildListener>>getServiceListeners()URLgetUrl()protected voidnotify(URL arg0, NotifyListener arg1, List<URL> arg2)protected voidsubscribeService(URL url, ServiceListener serviceListener)voidunavailable(URL arg0)protected voidunsubscribeService(URL url, ServiceListener serviceListener)-
Methods inherited from class com.networknt.registry.support.command.CommandFailbackRegistry
doDiscover, doSubscribe, doUnsubscribe, getCommandManagerMap
-
Methods inherited from class com.networknt.registry.support.FailbackRegistry
discover, register, subscribe, unregister, unsubscribe
-
-
-
-
Field Detail
-
registryClassName
protected String registryClassName
-
-
Constructor Detail
-
ZooKeeperRegistry
public ZooKeeperRegistry(URL url, ZooKeeperClient client)
-
-
Method Detail
-
getServiceListeners
public ConcurrentHashMap<URL,ConcurrentHashMap<ServiceListener,org.I0Itec.zkclient.IZkChildListener>> getServiceListeners()
-
subscribeService
protected void subscribeService(URL url, ServiceListener serviceListener)
- Specified by:
subscribeServicein classCommandFailbackRegistry
-
unsubscribeService
protected void unsubscribeService(URL url, ServiceListener serviceListener)
- Specified by:
unsubscribeServicein classCommandFailbackRegistry
-
discoverService
protected List<URL> discoverService(URL url)
- Specified by:
discoverServicein classCommandFailbackRegistry
-
doRegister
protected void doRegister(URL url)
-
doUnregister
protected void doUnregister(URL url)
-
doAvailable
protected void doAvailable(URL url)
-
doUnavailable
protected void doUnavailable(URL url)
-
getRegisteredServiceUrls
public Collection<URL> getRegisteredServiceUrls()
- Specified by:
getRegisteredServiceUrlsin interfaceRegistryService
-
available
public void available(URL arg0)
- Specified by:
availablein interfaceRegistryService
-
unavailable
public void unavailable(URL arg0)
- Specified by:
unavailablein interfaceRegistryService
-
notify
protected void notify(URL arg0, NotifyListener arg1, List<URL> arg2)
-
-