public class ZookeeperUtil extends Object
Constructor and Description |
---|
ZookeeperUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
deleteRecursive(String path,
org.apache.zookeeper.ZooKeeper zk)
Recursively deletes a path in Zookeeper.
|
static boolean |
exists(String path,
org.apache.zookeeper.ZooKeeper zk) |
static void |
makePath(String path,
byte[] data,
org.apache.zookeeper.ZooKeeper zk) |
static void |
makePath(String path,
byte[] data,
org.apache.zookeeper.ZooKeeper zk,
org.apache.zookeeper.CreateMode createMode) |
static void |
makePath(String path,
byte[] data,
org.apache.zookeeper.ZooKeeper zk,
org.apache.zookeeper.CreateMode createMode,
List<org.apache.zookeeper.data.ACL> acls)
Creates a path in Zookeeper, specified by the path argument.
|
static void |
makePath(String path,
org.apache.zookeeper.ZooKeeper zk)
Creates a path in Zookeeper, if it does not already exist, with CreateMode.PERSISTENT for the create mode and ZooDefs.Ids.OPEN_ACL_UNSAFE for ACLs.
|
public static void deleteRecursive(String path, org.apache.zookeeper.ZooKeeper zk) throws org.apache.zookeeper.KeeperException, InterruptedException
path
- zk
- org.apache.zookeeper.KeeperException
InterruptedException
public static void makePath(String path, org.apache.zookeeper.ZooKeeper zk) throws org.apache.zookeeper.KeeperException, InterruptedException
path
- zk
- org.apache.zookeeper.KeeperException
InterruptedException
public static void makePath(String path, byte[] data, org.apache.zookeeper.ZooKeeper zk) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static void makePath(String path, byte[] data, org.apache.zookeeper.ZooKeeper zk, org.apache.zookeeper.CreateMode createMode) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
public static void makePath(String path, byte[] data, org.apache.zookeeper.ZooKeeper zk, org.apache.zookeeper.CreateMode createMode, List<org.apache.zookeeper.data.ACL> acls) throws org.apache.zookeeper.KeeperException, InterruptedException
path
- data
- zk
- createMode
- acls
- org.apache.zookeeper.KeeperException
InterruptedException
public static boolean exists(String path, org.apache.zookeeper.ZooKeeper zk) throws org.apache.zookeeper.KeeperException, InterruptedException
org.apache.zookeeper.KeeperException
InterruptedException
Copyright © 2022. All rights reserved.