public class CuratorZookeeperService extends Object implements ZookeeperService, org.apache.curator.framework.state.ConnectionStateListener, Closeable
| 构造器和说明 |
|---|
CuratorZookeeperService(org.apache.curator.framework.CuratorFramework client) |
| 限定符和类型 | 方法和说明 |
|---|---|
CompletableFuture<Void> |
_asyncCreate(String path,
String content,
org.apache.zookeeper.CreateMode mode) |
List<String> |
addChildListener(String path,
ChildListener listener) |
void |
addDataListener(String path,
DataListener listener) |
void |
addDataListener(String path,
DataListener listener,
Executor executor) |
void |
addStateListener(StateListener listener) |
protected List<String> |
addTargetChildListener(String path,
com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl listener) |
protected void |
addTargetDataListener(String path,
com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl treeCacheListener) |
protected void |
addTargetDataListener(String path,
com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl treeCacheListener,
Executor executor) |
CompletableFuture<Boolean> |
asyncCheckExists(String path) |
CompletableFuture<Void> |
asyncCreate(String path,
org.apache.zookeeper.CreateMode mode) |
CompletableFuture<Void> |
asyncCreate(String path,
String content,
org.apache.zookeeper.CreateMode mode) |
CompletableFuture<Void> |
asyncDelete(String path) |
CompletableFuture<String> |
asyncGet(String path) |
CompletableFuture<List<String>> |
asyncGetChildren(String path) |
CompletableFuture<Void> |
asyncUpdate(String path,
String content) |
boolean |
checkExists(String path) |
void |
close() |
void |
create(String path,
org.apache.zookeeper.CreateMode mode) |
void |
create(String path,
String content,
org.apache.zookeeper.CreateMode mode) |
protected com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl |
createTargetChildListener(String path,
ChildListener listener) |
protected com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl |
createTargetDataListener(String path,
DataListener listener) |
void |
delete(String path) |
String |
get(String path) |
List<String> |
getChildren(String path) |
Set<StateListener> |
getSessionListeners() |
long |
id() |
com.swak.lock.Lock |
newLock(String path) |
void |
removeChildListener(String path,
ChildListener listener) |
void |
removeDataListener(String path,
DataListener listener) |
void |
removeStateListener(StateListener listener) |
void |
removeTargetChildListener(String path,
com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl listener) |
protected void |
removeTargetDataListener(String path,
com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl treeCacheListener) |
void |
stateChanged(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.state.ConnectionState state) |
protected void |
triggerStateChanged(int state) |
void |
update(String path,
String content) |
protected static final org.slf4j.Logger logger
protected static final Charset CHARSET
public CuratorZookeeperService(org.apache.curator.framework.CuratorFramework client)
public long id()
id 在接口中 ZookeeperServicepublic void addStateListener(StateListener listener)
addStateListener 在接口中 ZookeeperServicepublic void removeStateListener(StateListener listener)
removeStateListener 在接口中 ZookeeperServicepublic Set<StateListener> getSessionListeners()
protected void triggerStateChanged(int state)
public List<String> addChildListener(String path, ChildListener listener)
addChildListener 在接口中 ZookeeperServicepublic void addDataListener(String path, DataListener listener)
addDataListener 在接口中 ZookeeperServicepublic void addDataListener(String path, DataListener listener, Executor executor)
addDataListener 在接口中 ZookeeperServicepublic void removeDataListener(String path, DataListener listener)
removeDataListener 在接口中 ZookeeperServicepublic void removeChildListener(String path, ChildListener listener)
removeChildListener 在接口中 ZookeeperServiceprotected com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl createTargetChildListener(String path, ChildListener listener)
protected List<String> addTargetChildListener(String path, com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl listener)
protected com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl createTargetDataListener(String path, DataListener listener)
protected void addTargetDataListener(String path, com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl treeCacheListener)
protected void addTargetDataListener(String path, com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl treeCacheListener, Executor executor)
protected void removeTargetDataListener(String path, com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl treeCacheListener)
public void removeTargetChildListener(String path, com.swak.zookeeper.curator.CuratorZookeeperService.CuratorWatcherImpl listener)
public void close()
throws IOException
close 在接口中 Closeableclose 在接口中 AutoCloseableIOExceptionpublic void stateChanged(org.apache.curator.framework.CuratorFramework client,
org.apache.curator.framework.state.ConnectionState state)
stateChanged 在接口中 org.apache.curator.framework.state.ConnectionStateListenerpublic String get(String path)
get 在接口中 ZookeeperServicepublic void create(String path, org.apache.zookeeper.CreateMode mode)
create 在接口中 ZookeeperServicepublic void create(String path, String content, org.apache.zookeeper.CreateMode mode)
create 在接口中 ZookeeperServicepublic void update(String path, String content)
update 在接口中 ZookeeperServicepublic List<String> getChildren(String path)
getChildren 在接口中 ZookeeperServicepublic boolean checkExists(String path)
checkExists 在接口中 ZookeeperServicepublic void delete(String path)
delete 在接口中 ZookeeperServicepublic CompletableFuture<Boolean> asyncCheckExists(String path)
asyncCheckExists 在接口中 ZookeeperServicepublic CompletableFuture<String> asyncGet(String path)
asyncGet 在接口中 ZookeeperServicepublic CompletableFuture<Void> asyncCreate(String path, org.apache.zookeeper.CreateMode mode)
asyncCreate 在接口中 ZookeeperServicepublic CompletableFuture<Void> asyncCreate(String path, String content, org.apache.zookeeper.CreateMode mode)
asyncCreate 在接口中 ZookeeperServicepublic CompletableFuture<Void> _asyncCreate(String path, String content, org.apache.zookeeper.CreateMode mode)
public CompletableFuture<Void> asyncUpdate(String path, String content)
asyncUpdate 在接口中 ZookeeperServicepublic CompletableFuture<List<String>> asyncGetChildren(String path)
asyncGetChildren 在接口中 ZookeeperServicepublic CompletableFuture<Void> asyncDelete(String path)
asyncDelete 在接口中 ZookeeperServicepublic com.swak.lock.Lock newLock(String path)
newLock 在接口中 ZookeeperServiceCopyright © 2020. All rights reserved.