org.apache.accumulo.fate.zookeeper
public class ZooUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
ZooUtil.LockID |
static class |
ZooUtil.NodeExistsPolicy |
static class |
ZooUtil.NodeMissingPolicy |
protected static class |
ZooUtil.ZooKeeperConnectionInfo |
| Modifier and Type | Field and Description |
|---|---|
static List<org.apache.zookeeper.data.ACL> |
PRIVATE |
static List<org.apache.zookeeper.data.ACL> |
PUBLIC |
| Constructor and Description |
|---|
ZooUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
exists(ZooUtil.ZooKeeperConnectionInfo info,
String zPath) |
static byte[] |
getData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
org.apache.zookeeper.data.Stat stat) |
static byte[] |
getLockData(ZooCache zc,
String path) |
static org.apache.zookeeper.data.Stat |
getStatus(ZooUtil.ZooKeeperConnectionInfo info,
String zPath) |
protected static org.apache.zookeeper.ZooKeeper |
getZooKeeper(String keepers,
int timeout,
String scheme,
byte[] auth) |
protected static org.apache.zookeeper.ZooKeeper |
getZooKeeper(ZooUtil.ZooKeeperConnectionInfo info) |
static boolean |
isLockHeld(ZooUtil.ZooKeeperConnectionInfo info,
ZooUtil.LockID lid) |
static String |
putEphemeralData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data) |
static String |
putEphemeralSequential(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data) |
static boolean |
putPersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy) |
static boolean |
putPersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
int version,
ZooUtil.NodeExistsPolicy policy,
List<org.apache.zookeeper.data.ACL> acls) |
static boolean |
putPersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy)
Create a persistent node with the default ACL
|
static String |
putPersistentSequential(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data) |
static boolean |
putPrivatePersistentData(ZooUtil.ZooKeeperConnectionInfo info,
String zPath,
byte[] data,
ZooUtil.NodeExistsPolicy policy) |
static void |
recursiveCopyPersistent(ZooUtil.ZooKeeperConnectionInfo info,
String source,
String destination,
ZooUtil.NodeExistsPolicy policy) |
protected static void |
retryOrThrow(Retry retry,
org.apache.zookeeper.KeeperException e) |
public static final List<org.apache.zookeeper.data.ACL> PRIVATE
public static final List<org.apache.zookeeper.data.ACL> PUBLIC
protected static org.apache.zookeeper.ZooKeeper getZooKeeper(ZooUtil.ZooKeeperConnectionInfo info)
protected static org.apache.zookeeper.ZooKeeper getZooKeeper(String keepers, int timeout, String scheme, byte[] auth)
protected static void retryOrThrow(Retry retry, org.apache.zookeeper.KeeperException e) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperExceptionpublic static boolean putPersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, int version, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, int version, ZooUtil.NodeExistsPolicy policy, List<org.apache.zookeeper.data.ACL> acls) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static byte[] getData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static org.apache.zookeeper.data.Stat getStatus(ZooUtil.ZooKeeperConnectionInfo info, String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean exists(ZooUtil.ZooKeeperConnectionInfo info, String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static void recursiveCopyPersistent(ZooUtil.ZooKeeperConnectionInfo info, String source, String destination, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean putPrivatePersistentData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data, ZooUtil.NodeExistsPolicy policy) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static String putPersistentSequential(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static String putEphemeralData(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static String putEphemeralSequential(ZooUtil.ZooKeeperConnectionInfo info, String zPath, byte[] data) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic static boolean isLockHeld(ZooUtil.ZooKeeperConnectionInfo info, ZooUtil.LockID lid) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2011–2016 The Apache Software Foundation. All rights reserved.