Class ZooReader
- java.lang.Object
-
- org.apache.accumulo.fate.zookeeper.ZooReader
-
- Direct Known Subclasses:
ZooReaderWriter
public class ZooReader extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected String
keepers
protected static Retry.RetryFactory
RETRY_FACTORY
protected int
timeout
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
exists(String zPath)
boolean
exists(String zPath, org.apache.zookeeper.Watcher watcher)
List<String>
getChildren(String zPath)
List<String>
getChildren(String zPath, org.apache.zookeeper.Watcher watcher)
byte[]
getData(String zPath, org.apache.zookeeper.data.Stat stat)
byte[]
getData(String zPath, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.data.Stat stat)
protected Retry.RetryFactory
getRetryFactory()
org.apache.zookeeper.data.Stat
getStatus(String zPath)
org.apache.zookeeper.data.Stat
getStatus(String zPath, org.apache.zookeeper.Watcher watcher)
protected org.apache.zookeeper.ZooKeeper
getZooKeeper()
protected static void
retryOrThrow(Retry retry, org.apache.zookeeper.KeeperException e)
void
sync(String path)
-
-
-
Field Detail
-
RETRY_FACTORY
protected static final Retry.RetryFactory RETRY_FACTORY
-
keepers
protected final String keepers
-
timeout
protected final int timeout
-
-
Constructor Detail
-
ZooReader
public ZooReader(String keepers, int timeout)
-
-
Method Detail
-
getZooKeeper
protected org.apache.zookeeper.ZooKeeper getZooKeeper()
-
getRetryFactory
protected Retry.RetryFactory getRetryFactory()
-
retryOrThrow
protected static void retryOrThrow(Retry retry, org.apache.zookeeper.KeeperException e) throws org.apache.zookeeper.KeeperException
- Throws:
org.apache.zookeeper.KeeperException
-
getData
public byte[] getData(String zPath, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getData
public byte[] getData(String zPath, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.data.Stat stat) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getStatus
public org.apache.zookeeper.data.Stat getStatus(String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getStatus
public org.apache.zookeeper.data.Stat getStatus(String zPath, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getChildren
public List<String> getChildren(String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
getChildren
public List<String> getChildren(String zPath, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
exists
public boolean exists(String zPath) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
exists
public boolean exists(String zPath, org.apache.zookeeper.Watcher watcher) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
sync
public void sync(String path) throws org.apache.zookeeper.KeeperException, InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
-
-