public class BkZooKeeperClient
extends org.apache.zookeeper.ZooKeeper
implements org.apache.zookeeper.Watcher
| Modifier and Type | Class and Description |
|---|---|
static class |
BkZooKeeperClient.Builder
A builder to build retryable zookeeper client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAuthInfo(String scheme,
byte[] auth) |
void |
close() |
String |
create(String path,
byte[] data,
List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode) |
void |
create(String path,
byte[] data,
List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode,
org.apache.zookeeper.AsyncCallback.StringCallback cb,
Object context) |
protected org.apache.zookeeper.ZooKeeper |
createZooKeeper() |
void |
delete(String path,
int version) |
void |
delete(String path,
int version,
org.apache.zookeeper.AsyncCallback.VoidCallback cb,
Object context) |
org.apache.zookeeper.data.Stat |
exists(String path,
boolean watch) |
void |
exists(String path,
boolean watch,
org.apache.zookeeper.AsyncCallback.StatCallback cb,
Object context) |
org.apache.zookeeper.data.Stat |
exists(String path,
org.apache.zookeeper.Watcher watcher) |
void |
exists(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.AsyncCallback.StatCallback cb,
Object context) |
List<org.apache.zookeeper.data.ACL> |
getACL(String path,
org.apache.zookeeper.data.Stat stat) |
void |
getACL(String path,
org.apache.zookeeper.data.Stat stat,
org.apache.zookeeper.AsyncCallback.ACLCallback cb,
Object context) |
List<String> |
getChildren(String path,
boolean watch) |
void |
getChildren(String path,
boolean watch,
org.apache.zookeeper.AsyncCallback.Children2Callback cb,
Object context) |
void |
getChildren(String path,
boolean watch,
org.apache.zookeeper.AsyncCallback.ChildrenCallback cb,
Object context) |
List<String> |
getChildren(String path,
boolean watch,
org.apache.zookeeper.data.Stat stat) |
List<String> |
getChildren(String path,
org.apache.zookeeper.Watcher watcher) |
void |
getChildren(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.AsyncCallback.Children2Callback cb,
Object context) |
void |
getChildren(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.AsyncCallback.ChildrenCallback cb,
Object context) |
List<String> |
getChildren(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.data.Stat stat) |
void |
getData(String path,
boolean watch,
org.apache.zookeeper.AsyncCallback.DataCallback cb,
Object context) |
byte[] |
getData(String path,
boolean watch,
org.apache.zookeeper.data.Stat stat) |
void |
getData(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.AsyncCallback.DataCallback cb,
Object context) |
byte[] |
getData(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.data.Stat stat) |
long |
getSessionId() |
byte[] |
getSessionPasswd() |
int |
getSessionTimeout() |
org.apache.zookeeper.ZooKeeper.States |
getState() |
List<org.apache.zookeeper.OpResult> |
multi(Iterable<org.apache.zookeeper.Op> ops) |
void |
multi(Iterable<org.apache.zookeeper.Op> ops,
org.apache.zookeeper.AsyncCallback.MultiCallback cb,
Object context) |
static BkZooKeeperClient.Builder |
newBuilder() |
void |
process(org.apache.zookeeper.WatchedEvent event) |
void |
register(org.apache.zookeeper.Watcher watcher) |
org.apache.zookeeper.data.Stat |
setACL(String path,
List<org.apache.zookeeper.data.ACL> acl,
int version) |
void |
setACL(String path,
List<org.apache.zookeeper.data.ACL> acl,
int version,
org.apache.zookeeper.AsyncCallback.StatCallback cb,
Object context) |
org.apache.zookeeper.data.Stat |
setData(String path,
byte[] data,
int version) |
void |
setData(String path,
byte[] data,
int version,
org.apache.zookeeper.AsyncCallback.StatCallback cb,
Object context) |
void |
sync(String path,
org.apache.zookeeper.AsyncCallback.VoidCallback cb,
Object context) |
String |
toString() |
org.apache.zookeeper.Transaction |
transaction()
Deprecated.
|
protected void |
waitForConnection() |
public static BkZooKeeperClient.Builder newBuilder()
public void close()
throws InterruptedException
close in class org.apache.zookeeper.ZooKeeperInterruptedExceptionprotected void waitForConnection()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionprotected org.apache.zookeeper.ZooKeeper createZooKeeper()
throws IOException
IOExceptionpublic void process(org.apache.zookeeper.WatchedEvent event)
process in interface org.apache.zookeeper.Watcherpublic long getSessionId()
getSessionId in class org.apache.zookeeper.ZooKeeperpublic byte[] getSessionPasswd()
getSessionPasswd in class org.apache.zookeeper.ZooKeeperpublic int getSessionTimeout()
getSessionTimeout in class org.apache.zookeeper.ZooKeeperpublic void addAuthInfo(String scheme, byte[] auth)
addAuthInfo in class org.apache.zookeeper.ZooKeeperpublic void register(org.apache.zookeeper.Watcher watcher)
register in class org.apache.zookeeper.ZooKeeperpublic List<org.apache.zookeeper.OpResult> multi(Iterable<org.apache.zookeeper.Op> ops) throws InterruptedException, org.apache.zookeeper.KeeperException
multi in class org.apache.zookeeper.ZooKeeperInterruptedExceptionorg.apache.zookeeper.KeeperExceptionpublic void multi(Iterable<org.apache.zookeeper.Op> ops, org.apache.zookeeper.AsyncCallback.MultiCallback cb, Object context)
multi in class org.apache.zookeeper.ZooKeeper@Deprecated public org.apache.zookeeper.Transaction transaction()
transaction in class org.apache.zookeeper.ZooKeeperpublic List<org.apache.zookeeper.data.ACL> getACL(String path, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
getACL in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void getACL(String path, org.apache.zookeeper.data.Stat stat, org.apache.zookeeper.AsyncCallback.ACLCallback cb, Object context)
getACL in class org.apache.zookeeper.ZooKeeperpublic org.apache.zookeeper.data.Stat setACL(String path, List<org.apache.zookeeper.data.ACL> acl, int version) throws org.apache.zookeeper.KeeperException, InterruptedException
setACL in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void setACL(String path, List<org.apache.zookeeper.data.ACL> acl, int version, org.apache.zookeeper.AsyncCallback.StatCallback cb, Object context)
setACL in class org.apache.zookeeper.ZooKeeperpublic void sync(String path, org.apache.zookeeper.AsyncCallback.VoidCallback cb, Object context)
sync in class org.apache.zookeeper.ZooKeeperpublic org.apache.zookeeper.ZooKeeper.States getState()
getState in class org.apache.zookeeper.ZooKeeperpublic String toString()
toString in class org.apache.zookeeper.ZooKeeperpublic String create(String path, byte[] data, List<org.apache.zookeeper.data.ACL> acl, org.apache.zookeeper.CreateMode createMode) throws org.apache.zookeeper.KeeperException, InterruptedException
create in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void create(String path, byte[] data, List<org.apache.zookeeper.data.ACL> acl, org.apache.zookeeper.CreateMode createMode, org.apache.zookeeper.AsyncCallback.StringCallback cb, Object context)
create in class org.apache.zookeeper.ZooKeeperpublic void delete(String path, int version) throws org.apache.zookeeper.KeeperException, InterruptedException
delete in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void delete(String path, int version, org.apache.zookeeper.AsyncCallback.VoidCallback cb, Object context)
delete in class org.apache.zookeeper.ZooKeeperpublic org.apache.zookeeper.data.Stat exists(String path, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
exists in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic org.apache.zookeeper.data.Stat exists(String path, boolean watch) throws org.apache.zookeeper.KeeperException, InterruptedException
exists in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void exists(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.AsyncCallback.StatCallback cb, Object context)
exists in class org.apache.zookeeper.ZooKeeperpublic void exists(String path, boolean watch, org.apache.zookeeper.AsyncCallback.StatCallback cb, Object context)
exists in class org.apache.zookeeper.ZooKeeperpublic byte[] getData(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
getData in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic byte[] getData(String path, boolean watch, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
getData in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void getData(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.AsyncCallback.DataCallback cb, Object context)
getData in class org.apache.zookeeper.ZooKeeperpublic void getData(String path, boolean watch, org.apache.zookeeper.AsyncCallback.DataCallback cb, Object context)
getData in class org.apache.zookeeper.ZooKeeperpublic org.apache.zookeeper.data.Stat setData(String path, byte[] data, int version) throws org.apache.zookeeper.KeeperException, InterruptedException
setData in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void setData(String path, byte[] data, int version, org.apache.zookeeper.AsyncCallback.StatCallback cb, Object context)
setData in class org.apache.zookeeper.ZooKeeperpublic List<String> getChildren(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
getChildren in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic List<String> getChildren(String path, boolean watch, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
getChildren in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void getChildren(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.AsyncCallback.Children2Callback cb, Object context)
getChildren in class org.apache.zookeeper.ZooKeeperpublic void getChildren(String path, boolean watch, org.apache.zookeeper.AsyncCallback.Children2Callback cb, Object context)
getChildren in class org.apache.zookeeper.ZooKeeperpublic List<String> getChildren(String path, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
getChildren in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic List<String> getChildren(String path, boolean watch) throws org.apache.zookeeper.KeeperException, InterruptedException
getChildren in class org.apache.zookeeper.ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void getChildren(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.AsyncCallback.ChildrenCallback cb, Object context)
getChildren in class org.apache.zookeeper.ZooKeeperCopyright © 2017–2018 Apache Software Foundation. All rights reserved.