| 程序包 | 说明 |
|---|---|
| org.apache.hadoop.hbase.zookeeper |
| 限定符和类型 | 字段和说明 |
|---|---|
protected ZooKeeperWatcher |
ZooKeeperListener.watcher |
| 限定符和类型 | 方法和说明 |
|---|---|
ZooKeeperWatcher |
ZooKeeperListener.getWatcher() |
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
ZKUtil2.asyncCreate(ZooKeeperWatcher zkw,
String znode,
byte[] data,
org.apache.zookeeper.AsyncCallback.StringCallback cb,
Object ctx)
Async creates the specified node with the specified data.
|
static byte[] |
ZKUtil2.blockUntilAvailable(ZooKeeperWatcher zkw,
String znode,
long timeout) |
static int |
ZKUtil2.checkExists(ZooKeeperWatcher zkw,
String znode)
Check if the specified node exists.
|
static ArrayList<org.apache.zookeeper.data.ACL> |
ZKUtil2.createACL(ZooKeeperWatcher zkw,
String node,
boolean isSecureZooKeeper) |
static void |
ZKUtil2.createAndFailSilent(ZooKeeperWatcher zkw,
String znode)
Creates the specified node, iff the node does not exist.
|
static void |
ZKUtil2.createAndFailSilent(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified node containing specified data, iff the node does not exist.
|
static int |
ZKUtil2.createAndWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified node with the specified data and watches it.
|
static boolean |
ZKUtil2.createEphemeralNodeAndWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Set the specified znode to be an ephemeral node carrying the specified
data.
|
static boolean |
ZKUtil2.createNodeIfNotExistsAndWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified znode to be a persistent node carrying the specified
data.
|
static String |
ZKUtil2.createNodeIfNotExistsNoWatch(ZooKeeperWatcher zkw,
String znode,
byte[] data,
org.apache.zookeeper.CreateMode createMode)
Creates the specified znode with the specified data but does not watch it.
|
static void |
ZKUtil2.createSetData(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Set data into node creating node if it doesn't yet exist.
|
static void |
ZKUtil2.createWithParents(ZooKeeperWatcher zkw,
String znode)
Creates the specified node and all parent nodes required for it to exist.
|
static void |
ZKUtil2.createWithParents(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Creates the specified node and all parent nodes required for it to exist.
|
static void |
ZKUtil2.deleteNode(ZooKeeperWatcher zkw,
String node)
Delete the specified node.
|
static boolean |
ZKUtil2.deleteNode(ZooKeeperWatcher zkw,
String node,
int version)
Delete the specified node with the specified version.
|
static void |
ZKUtil2.deleteNodeFailSilent(ZooKeeperWatcher zkw,
String node)
Deletes the specified node.
|
static List<ZKUtil2.NodeAndData> |
ZKUtil2.getChildDataAndWatchForNewChildren(ZooKeeperWatcher zkw,
String baseNode)
已过时。
Unused
|
static byte[] |
ZKUtil2.getData(ZooKeeperWatcher zkw,
String znode)
Get znode data.
|
static byte[] |
ZKUtil2.getDataAndWatch(ZooKeeperWatcher zkw,
String znode)
Get the data at the specified znode and set a watch.
|
static byte[] |
ZKUtil2.getDataAndWatch(ZooKeeperWatcher zkw,
String znode,
org.apache.zookeeper.data.Stat stat)
Get the data at the specified znode and set a watch.
|
static byte[] |
ZKUtil2.getDataNoWatch(ZooKeeperWatcher zkw,
String znode,
org.apache.zookeeper.data.Stat stat)
Get the data at the specified znode without setting a watch.
|
static int |
ZKUtil2.getNumberOfChildren(ZooKeeperWatcher zkw,
String znode)
Get the number of children of the specified node.
|
static List<String> |
ZKUtil2.listChildrenAndWatchForNewChildren(ZooKeeperWatcher zkw,
String znode)
Lists the children znodes of the specified znode.
|
static List<String> |
ZKUtil2.listChildrenAndWatchThem(ZooKeeperWatcher zkw,
String znode)
List all the children of the specified znode, setting a watch for children
changes and also setting a watch on every individual child in order to get
the NodeCreated and NodeDeleted events.
|
static List<String> |
ZKUtil2.listChildrenNoWatch(ZooKeeperWatcher zkw,
String znode)
Lists the children of the specified znode without setting any watches.
|
static void |
ZKUtil2.logZKTree(ZooKeeperWatcher zkw,
String root)
Recursively print the current state of ZK (non-transactional)
|
protected static void |
ZKUtil2.logZKTree(ZooKeeperWatcher zkw,
String root,
String prefix)
Helper method to print the current state of the ZK tree.
|
static boolean |
ZKUtil2.nodeHasChildren(ZooKeeperWatcher zkw,
String znode)
Checks if the specified znode has any children.
|
static void |
ZKUtil2.setData(ZooKeeperWatcher zkw,
String znode,
byte[] data)
Sets the data of the existing znode to be the specified data.
|
static boolean |
ZKUtil2.setData(ZooKeeperWatcher zkw,
String znode,
byte[] data,
int expectedVersion)
Sets the data of the existing znode to be the specified data.
|
static boolean |
ZKUtil2.setWatchIfNodeExists(ZooKeeperWatcher zkw,
String znode)
Watch the specified znode, but only if exists.
|
static void |
ZKUtil2.updateExistingNodeData(ZooKeeperWatcher zkw,
String znode,
byte[] data,
int expectedVersion)
已过时。
Unused
|
static boolean |
ZKUtil2.watchAndCheckExists(ZooKeeperWatcher zkw,
String znode)
Watch the specified znode for delete/create/change events.
|
| 构造器和说明 |
|---|
ZooKeeperListener(ZooKeeperWatcher watcher)
Construct a ZooKeeper event listener.
|
Copyright © 2007–2019. All rights reserved.