public abstract class BaseClient extends Object implements IClient
| 限定符 | 构造器和说明 |
|---|---|
protected |
BaseClient(BaseContext context) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
blockUntilConnected(int waitingTime,
TimeUnit timeUnit)
Block until connected.
|
void |
close()
Close.
|
protected void |
createNamespace() |
protected void |
deleteNamespace() |
void |
registerWatch(String key,
ZookeeperEventListener zookeeperEventListener)
Register watcher.
|
void |
start()
Start.
|
boolean |
start(int waitingTime,
TimeUnit timeUnit)
Start until out.
|
void |
unregisterWatch(String key)
Unregister watcher.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetExecStrategy, transaction, useExecStrategycheckExists, checkExists, createCurrentOnly, deleteOnlyCurrent, deleteOnlyCurrent, getChildren, getData, getData, getDataString, updatecreateAllNeedPath, deleteAllChildren, deleteCurrentBranchprotected BaseClient(BaseContext context)
public void start()
throws IOException,
InterruptedException
IClientstart 在接口中 IClientIOException - IO exceptionInterruptedException - interrupted exceptionpublic boolean start(int waitingTime,
TimeUnit timeUnit)
throws InterruptedException,
IOException
IClientstart 在接口中 IClientwaitingTime - waiting timetimeUnit - time unitInterruptedException - interrupted exceptionIOException - IO exceptionpublic boolean blockUntilConnected(int waitingTime,
TimeUnit timeUnit)
throws InterruptedException
IClientblockUntilConnected 在接口中 IClientwaitingTime - waiting timetimeUnit - time unitInterruptedException - interrupted exceptionpublic final void registerWatch(String key, ZookeeperEventListener zookeeperEventListener)
IClientregisterWatch 在接口中 IClientkey - keyzookeeperEventListener - zookeeper event listenerpublic final void unregisterWatch(String key)
IClientunregisterWatch 在接口中 IClientkey - keyprotected void createNamespace()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionprotected final void deleteNamespace()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2018. All rights reserved.