public final class ZkUtils extends Object
| Constructor and Description |
|---|
ZkUtils() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
checkNodeAndWaitExpired(ZooKeeper zk,
String path,
long sessionTimeoutMs)
Check if the provided path exists or not and wait it expired if possible.
|
static String |
getParentForPath(String path)
Returns the parent path of the provided path.
|
public static boolean checkNodeAndWaitExpired(ZooKeeper zk, String path, long sessionTimeoutMs) throws KeeperException, InterruptedException
zk - the zookeeper client instancepath - the zookeeper pathsessionTimeoutMs - session timeout in millisecondsKeeperException - when failed to access zookeeperInterruptedException - interrupted when waiting for znode to be expiredpublic static String getParentForPath(String path)
Paths.get(String, String...)
and Path.getParent() instead.path - the zookeeper pathCopyright © 2017–2021 Apache Software Foundation. All rights reserved.