zookeeper工具

主要用于和zookeeper的连接

工具类路径:com.wueasy.base.util.ZkHelper

/**
 * 获取zk实例
 * @author: fallsea
 * @return
 */
public static ZkClient getInstance()

/**
 * 查询子节点列表
 * @author: fallsea
 * @param path 节点路径
 * @return
 */
public static List<String> getChildren(String path)


/**
 * @Description:判断节点是否存在
 * @author: fallsea
 * @param path
 * @return true 存在
 */
public static boolean exists(String path)

/**
 * 创建临时节点
 * @author: fallsea
 * @param path
 */
public static void createEphemeral(String path)

/**
 * 创建永久节点
 * @author: fallsea
 * @param path
 */
public static void createPersistent(String path)
Copyright © wueasy.com 2017-2021 all right reserved,powered by Gitbook未经允许,禁止以任何形式传播 修订时间: 2019-11-18

results matching ""

    No results matching ""