程序包 org.tio.utils.zk

类 Zk

java.lang.Object
org.tio.utils.zk.Zk

public class Zk extends Object
作者:
tanyaowu 2017年9月19日 下午3:06:34
  • 字段详细资料

    • zkclient

      public static org.apache.curator.framework.CuratorFramework zkclient
  • 构造器详细资料

    • Zk

      public Zk()
  • 方法详细资料

    • init

      public static void init(String address, ClientDecorator clientDecorator) throws Exception
      参数:
      address -
      clientDecorator -
      抛出:
      Exception
    • start

      public static void start()
      Start the client. Most mutator methods will not work until the client is started
    • createOrUpdate

      public static void createOrUpdate(String path, String content, org.apache.zookeeper.CreateMode createMode) throws Exception
      参数:
      path -
      content -
      createMode -
      抛出:
      Exception
    • createOrUpdate

      public static void createOrUpdate(String path, byte[] content, org.apache.zookeeper.CreateMode createMode) throws Exception
      参数:
      path -
      content -
      createMode -
      抛出:
      Exception
    • createContainers

      public static void createContainers(String path) throws Exception
      抛出:
      Exception
    • delete

      public static void delete(String path) throws Exception
      参数:
      path -
      抛出:
      Exception
    • exists

      public static boolean exists(String path) throws Exception
      参数:
      path -
      返回:
      抛出:
      Exception
    • getBytes

      public static byte[] getBytes(String path) throws Exception
      参数:
      path -
      返回:
      抛出:
      Exception
    • getString

      public static String getString(String path, String charset) throws Exception
      参数:
      path -
      charset -
      返回:
      抛出:
      Exception
    • getString

      public static String getString(String path) throws Exception
      抛出:
      Exception
    • getChildren

      public static List<String> getChildren(String path) throws Exception
      参数:
      path -
      返回:
      抛出:
      Exception
    • upload

      public static void upload(String path, String localpath, org.apache.zookeeper.CreateMode createMode) throws Exception
      参数:
      path -
      localpath -
      createMode -
      抛出:
      Exception
    • setData

      public static void setData(String path, byte[] bs) throws Exception
      参数:
      path -
      bs -
      抛出:
      Exception
    • setData

      public static void setData(String path, String content) throws Exception
      参数:
      path -
      content -
      抛出:
      Exception
    • addPathChildrenCacheListener

      public static void addPathChildrenCacheListener(String path, org.apache.curator.framework.recipes.cache.PathChildrenCacheListener pathChildrenCacheListener) throws Exception
      参数:
      path -
      pathChildrenCacheListener -
      抛出:
      Exception