|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.linkedin.zookeeper.client.AbstractZooKeeper
org.linkedin.zookeeper.client.AbstractZKClient
public abstract class AbstractZKClient
| Field Summary | |
|---|---|
static org.slf4j.Logger |
log
|
static java.lang.String |
MODULE
|
| Constructor Summary | |
|---|---|
AbstractZKClient(java.lang.String chroot)
Constructor |
|
| Method Summary | |
|---|---|
void |
create(java.lang.String path,
java.lang.String data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
|
void |
createBytesNode(java.lang.String path,
byte[] data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
|
void |
createBytesNodeWithParents(java.lang.String path,
byte[] data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
Creates the parents if they don't exist |
org.apache.zookeeper.data.Stat |
createOrSetWithParents(java.lang.String path,
java.lang.String data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
Tries to create first and if the node exists, then does a setData. |
void |
createWithParents(java.lang.String path,
java.lang.String data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
Creates the parents if they don't exist |
void |
delete(java.lang.String path)
|
void |
deleteWithChildren(java.lang.String path)
delete all the children if they exist |
org.apache.zookeeper.data.Stat |
exists(java.lang.String path)
|
java.util.List<java.lang.String> |
getAllChildren(java.lang.String path)
Returns all the children (recursively) of the provided path. |
java.util.List<java.lang.String> |
getChildren(java.lang.String path)
|
byte[] |
getData(java.lang.String path)
|
java.lang.String |
getStringData(java.lang.String path)
|
ZKData<byte[]> |
getZKByteData(java.lang.String path)
Returns both the data as a byte[] as well as the stat |
ZKData<byte[]> |
getZKByteData(java.lang.String path,
org.apache.zookeeper.Watcher watcher)
Returns both the data as a byte[] as well as the stat (and sets a watcher if not null) |
ZKChildren |
getZKChildren(java.lang.String path,
org.apache.zookeeper.Watcher watcher)
|
ZKData<java.lang.String> |
getZKStringData(java.lang.String path)
Returns both the data as a string as well as the stat |
ZKData<java.lang.String> |
getZKStringData(java.lang.String path,
org.apache.zookeeper.Watcher watcher)
Returns both the data as a string as well as the stat (and sets a watcher if not null) |
org.apache.zookeeper.data.Stat |
setByteData(java.lang.String path,
byte[] data)
|
org.apache.zookeeper.data.Stat |
setData(java.lang.String path,
java.lang.String data)
|
| Methods inherited from class org.linkedin.zookeeper.client.AbstractZooKeeper |
|---|
addAuthInfo, adjustPath, adjustPath, close, create, create, delete, delete, exists, exists, exists, exists, getACL, getACL, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getData, getData, getData, getData, getSessionId, getSessionPasswd, getSessionTimeout, getState, getZk, register, setACL, setACL, setData, setData, sync |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.linkedin.zookeeper.client.IZKClient |
|---|
chroot, isConnected, registerListener, removeListener |
| Methods inherited from interface org.linkedin.zookeeper.client.IZooKeeper |
|---|
addAuthInfo, close, create, create, delete, delete, exists, exists, exists, exists, getACL, getACL, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getChildren, getData, getData, getData, getData, getSessionId, getSessionPasswd, getSessionTimeout, getState, register, setACL, setACL, setData, setData, sync |
| Field Detail |
|---|
public static final java.lang.String MODULE
public static final org.slf4j.Logger log
| Constructor Detail |
|---|
public AbstractZKClient(java.lang.String chroot)
| Method Detail |
|---|
public org.apache.zookeeper.data.Stat exists(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
exists in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public java.util.List<java.lang.String> getChildren(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getChildren in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public ZKChildren getZKChildren(java.lang.String path,
org.apache.zookeeper.Watcher watcher)
throws org.apache.zookeeper.KeeperException,
java.lang.InterruptedException
getZKChildren in interface IZKClientorg.apache.zookeeper.KeeperException
java.lang.InterruptedException
public java.util.List<java.lang.String> getAllChildren(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getChildren(String)
the result is relative to path.
getAllChildren in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public void create(java.lang.String path,
java.lang.String data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
create in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public void createBytesNode(java.lang.String path,
byte[] data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
createBytesNode in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public void createWithParents(java.lang.String path,
java.lang.String data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
createWithParents in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public void createBytesNodeWithParents(java.lang.String path,
byte[] data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
createBytesNodeWithParents in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public byte[] getData(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public java.lang.String getStringData(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getStringData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public ZKData<java.lang.String> getZKStringData(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getZKStringData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public ZKData<java.lang.String> getZKStringData(java.lang.String path,
org.apache.zookeeper.Watcher watcher)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getZKStringData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public ZKData<byte[]> getZKByteData(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getZKByteData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public ZKData<byte[]> getZKByteData(java.lang.String path,
org.apache.zookeeper.Watcher watcher)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
getZKByteData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public org.apache.zookeeper.data.Stat setData(java.lang.String path,
java.lang.String data)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
setData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public org.apache.zookeeper.data.Stat setByteData(java.lang.String path,
byte[] data)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
setByteData in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public org.apache.zookeeper.data.Stat createOrSetWithParents(java.lang.String path,
java.lang.String data,
java.util.List<org.apache.zookeeper.data.ACL> acl,
org.apache.zookeeper.CreateMode createMode)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
createOrSetWithParents in interface IZKClientnull if create worked, otherwise the result of setData
java.lang.InterruptedException
org.apache.zookeeper.KeeperException
public void delete(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
delete in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
public void deleteWithChildren(java.lang.String path)
throws java.lang.InterruptedException,
org.apache.zookeeper.KeeperException
deleteWithChildren in interface IZKClientjava.lang.InterruptedException
org.apache.zookeeper.KeeperException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||