|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Object com.taobao.metamorphosis.utils.ZkUtils
public class ZkUtils
与zk交互的工具类
嵌套类摘要 | |
---|---|
static class |
ZkUtils.StringSerializer
|
static class |
ZkUtils.ZKConfig
|
构造方法摘要 | |
---|---|
ZkUtils()
|
方法摘要 | |
---|---|
static void |
createEphemeralPath(org.I0Itec.zkclient.ZkClient client,
String path,
String data)
Create an ephemeral node with the given path and data. |
static void |
createEphemeralPathExpectConflict(org.I0Itec.zkclient.ZkClient client,
String path,
String data)
Create an ephemeral node with the given path and data. |
static void |
createParentPath(org.I0Itec.zkclient.ZkClient client,
String path)
create the parent path |
static void |
deletePath(org.I0Itec.zkclient.ZkClient client,
String path)
|
static void |
deletePathRecursive(org.I0Itec.zkclient.ZkClient client,
String path)
|
static List<String> |
getChildren(org.I0Itec.zkclient.ZkClient client,
String path)
|
static List<String> |
getChildrenMaybeNull(org.I0Itec.zkclient.ZkClient client,
String path)
|
static String |
getLastPart(String path)
|
static void |
makeSurePersistentPathExists(org.I0Itec.zkclient.ZkClient client,
String path)
make sure a persiste.nt path exists in ZK. |
static boolean |
pathExists(org.I0Itec.zkclient.ZkClient client,
String path)
Check if the given path exists |
static String |
readData(org.I0Itec.zkclient.ZkClient client,
String path)
|
static String |
readDataMaybeNull(org.I0Itec.zkclient.ZkClient client,
String path)
|
static void |
updateEphemeralPath(org.I0Itec.zkclient.ZkClient client,
String path,
String data)
Update the value of a persistent node with the given path and data. |
static void |
updatePersistentPath(org.I0Itec.zkclient.ZkClient client,
String path,
String data)
Update the value of a persistent node with the given path and data. |
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public ZkUtils()
方法详细信息 |
---|
public static void makeSurePersistentPathExists(org.I0Itec.zkclient.ZkClient client, String path) throws Exception
Exception
public static void createParentPath(org.I0Itec.zkclient.ZkClient client, String path) throws Exception
Exception
public static void createEphemeralPath(org.I0Itec.zkclient.ZkClient client, String path, String data) throws Exception
Exception
public static void createEphemeralPathExpectConflict(org.I0Itec.zkclient.ZkClient client, String path, String data) throws Exception
Exception
public static void updatePersistentPath(org.I0Itec.zkclient.ZkClient client, String path, String data) throws Exception
Exception
public static String readData(org.I0Itec.zkclient.ZkClient client, String path)
public static String readDataMaybeNull(org.I0Itec.zkclient.ZkClient client, String path)
public static void updateEphemeralPath(org.I0Itec.zkclient.ZkClient client, String path, String data) throws Exception
Exception
public static void deletePath(org.I0Itec.zkclient.ZkClient client, String path) throws Exception
Exception
public static void deletePathRecursive(org.I0Itec.zkclient.ZkClient client, String path) throws Exception
Exception
public static List<String> getChildren(org.I0Itec.zkclient.ZkClient client, String path)
public static List<String> getChildrenMaybeNull(org.I0Itec.zkclient.ZkClient client, String path)
public static boolean pathExists(org.I0Itec.zkclient.ZkClient client, String path)
public static String getLastPart(String path)
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |