org.apache.blur.zookeeper
Class ZkUtils

java.lang.Object
  extended by org.apache.blur.zookeeper.ZkUtils

public class ZkUtils
extends Object


Nested Class Summary
static class ZkUtils.ConnectionWatcher
           
 
Field Summary
static int ANY_VERSION
           
 
Constructor Summary
ZkUtils()
           
 
Method Summary
static void deleteAnyVersion(org.apache.zookeeper.ZooKeeper zk, String path)
           
static boolean exists(org.apache.zookeeper.ZooKeeper zk, String... path)
           
static String getPath(String... parts)
           
static void mkNodes(org.apache.zookeeper.ZooKeeper zk, String... path)
           
static void mkNodesStr(org.apache.zookeeper.ZooKeeper zk, String path)
           
static org.apache.zookeeper.ZooKeeper newZooKeeper(String zkConnectionString, int sessionTimeout)
           
static void pause(Object o)
           
static void rmr(org.apache.zookeeper.ZooKeeper zooKeeper, String path)
           
static void waitUntilExists(org.apache.zookeeper.ZooKeeper zooKeeper, String path)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ANY_VERSION

public static final int ANY_VERSION
See Also:
Constant Field Values
Constructor Detail

ZkUtils

public ZkUtils()
Method Detail

pause

public static void pause(Object o)

newZooKeeper

public static org.apache.zookeeper.ZooKeeper newZooKeeper(String zkConnectionString,
                                                          int sessionTimeout)
                                                   throws IOException
Throws:
IOException

mkNodesStr

public static void mkNodesStr(org.apache.zookeeper.ZooKeeper zk,
                              String path)

mkNodes

public static void mkNodes(org.apache.zookeeper.ZooKeeper zk,
                           String... path)

getPath

public static String getPath(String... parts)

exists

public static boolean exists(org.apache.zookeeper.ZooKeeper zk,
                             String... path)

deleteAnyVersion

public static void deleteAnyVersion(org.apache.zookeeper.ZooKeeper zk,
                                    String path)

waitUntilExists

public static void waitUntilExists(org.apache.zookeeper.ZooKeeper zooKeeper,
                                   String path)

rmr

public static void rmr(org.apache.zookeeper.ZooKeeper zooKeeper,
                       String path)
                throws org.apache.zookeeper.KeeperException,
                       InterruptedException
Throws:
org.apache.zookeeper.KeeperException
InterruptedException


Copyright © 2012-2014 The Apache Software Foundation. All Rights Reserved.