public class ResilientActiveKeyValueStore extends ConnectionWatcher
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
static int |
MAX_RETRIES |
static int |
RETRY_PERIOD_SECONDS |
zk| Constructor and Description |
|---|
ResilientActiveKeyValueStore(boolean debug) |
| Modifier and Type | Method and Description |
|---|---|
String |
createEphemeralNode(String path,
String value,
org.apache.zookeeper.CreateMode createMode) |
void |
deleteNode(String path) |
boolean |
exists(String path)
判断是否存在
|
List<String> |
getRootChildren() |
String |
read(String path,
org.apache.zookeeper.Watcher watcher,
org.apache.zookeeper.data.Stat stat) |
void |
write(String path,
String value) |
protected static final org.slf4j.Logger LOGGER
public static final int MAX_RETRIES
public static final int RETRY_PERIOD_SECONDS
public ResilientActiveKeyValueStore(boolean debug)
debug - public void write(String path, String value) throws InterruptedException, org.apache.zookeeper.KeeperException
path - value - InterruptedExceptionorg.apache.zookeeper.KeeperExceptionpublic String createEphemeralNode(String path, String value, org.apache.zookeeper.CreateMode createMode) throws InterruptedException, org.apache.zookeeper.KeeperException
path - value - InterruptedExceptionorg.apache.zookeeper.KeeperExceptionpublic boolean exists(String path) throws InterruptedException, org.apache.zookeeper.KeeperException
path - InterruptedExceptionorg.apache.zookeeper.KeeperExceptionpublic String read(String path, org.apache.zookeeper.Watcher watcher, org.apache.zookeeper.data.Stat stat) throws InterruptedException, org.apache.zookeeper.KeeperException
path - watcher - InterruptedExceptionorg.apache.zookeeper.KeeperExceptionpublic void deleteNode(String path)
path - Copyright © 2015–2016 Baidu. All rights reserved.