public abstract class AbstractZookeeperTransporter extends Object implements ZookeeperTransporter
If you want to extend this, implements createZookeeperClient.
CURATOR, CURATOR_5| Constructor and Description |
|---|
AbstractZookeeperTransporter() |
| Modifier and Type | Method and Description |
|---|---|
ZookeeperClient |
connect(URL url)
share connect for registry, metadata, etc..
|
void |
destroy() |
ZookeeperClient |
fetchAndUpdateZookeeperClientCache(List<String> addressList)
get the ZookeeperClient from cache, the ZookeeperClient must be connected.
|
List<String> |
getURLBackupAddress(URL url)
get all zookeeper urls (such as zookeeper://127.0.0.1:2181?backup=127.0.0.1:8989,127.0.0.1:9999)
|
Map<String,ZookeeperClient> |
getZookeeperClientMap()
for unit test
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExtension, isHighVersionCuratorpublic ZookeeperClient connect(URL url)
Make sure the connection is connected.
connect in interface ZookeeperTransporterurl - public ZookeeperClient fetchAndUpdateZookeeperClientCache(List<String> addressList)
It is not private method for unit test.
addressList - public List<String> getURLBackupAddress(URL url)
url - such as zookeeper://127.0.0.1:2181?backup=127.0.0.1:8989,127.0.0.1:9999public Map<String,ZookeeperClient> getZookeeperClientMap()
public void destroy()
destroy in interface ZookeeperTransporterCopyright © 2011–2020 The Apache Software Foundation. All rights reserved.