public class ClientZookeeper extends Object
Constructor and Description |
---|
ClientZookeeper() |
Modifier and Type | Method and Description |
---|---|
static void |
addListener(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
org.apache.storm.shade.org.apache.curator.framework.state.ConnectionStateListener listener) |
static String |
createNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
byte[] data,
org.apache.storm.shade.org.apache.zookeeper.CreateMode mode,
List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls) |
static String |
createNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
byte[] data,
List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls) |
static void |
deleteNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path) |
static void |
deleteNodeBlobstore(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String parentPath,
String hostPortInfo) |
static boolean |
exists(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
boolean watch) |
static boolean |
existsNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
boolean watch) |
static List<String> |
getChildren(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
boolean watch) |
static byte[] |
getData(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
boolean watch) |
static VersionedData<byte[]> |
getDataWithVersion(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
boolean watch)
Get the data along with a version.
|
static Integer |
getVersion(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
boolean watch) |
static org.apache.storm.shade.org.apache.curator.framework.CuratorFramework |
mkClient(Map<String,Object> conf,
List<String> servers,
Object port,
String root,
WatcherCallBack watcher,
Map<String,Object> authConf,
DaemonType type) |
org.apache.storm.shade.org.apache.curator.framework.CuratorFramework |
mkClientImpl(Map<String,Object> conf,
List<String> servers,
Object port,
String root,
WatcherCallBack watcher,
Map<String,Object> authConf,
DaemonType type) |
static void |
mkdirs(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls) |
void |
mkdirsImpl(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls) |
static String |
normalizePath(String path) |
static String |
parentPath(String path) |
static void |
resetInstance()
Resets the singleton instance to the default.
|
static org.apache.storm.shade.org.apache.zookeeper.data.Stat |
setData(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path,
byte[] data) |
static void |
setInstance(ClientZookeeper u)
Provide an instance of this class for delegates to use.
|
static void |
syncPath(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk,
String path) |
static List<String> |
tokenizePath(String path) |
static String |
toksToPath(List<String> toks) |
public static void setInstance(ClientZookeeper u)
Provide an instance of this class for delegates to use. To mock out delegated methods, provide an instance of a subclass that overrides the implementation of the delegated method.
u
- a ClientZookeeper instancepublic static void resetInstance()
Resets the singleton instance to the default. This is helpful to reset the class to its original functionality when mocking is no longer desired.
public static void mkdirs(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls)
public static org.apache.storm.shade.org.apache.curator.framework.CuratorFramework mkClient(Map<String,Object> conf, List<String> servers, Object port, String root, WatcherCallBack watcher, Map<String,Object> authConf, DaemonType type)
public static void deleteNodeBlobstore(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String parentPath, String hostPortInfo)
public static String createNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, byte[] data, org.apache.storm.shade.org.apache.zookeeper.CreateMode mode, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls)
public static String createNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, byte[] data, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls)
public static boolean existsNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, boolean watch)
public static void deleteNode(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path)
public static boolean exists(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, boolean watch)
public static org.apache.storm.shade.org.apache.zookeeper.data.Stat setData(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, byte[] data)
public static Integer getVersion(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, boolean watch) throws Exception
Exception
public static List<String> getChildren(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, boolean watch)
public static byte[] getData(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, boolean watch)
public static VersionedData<byte[]> getDataWithVersion(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, boolean watch)
Get the data along with a version.
zk
- the zk instance to usepath
- the path to get it fromwatch
- should a watch be enabledpublic static void addListener(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, org.apache.storm.shade.org.apache.curator.framework.state.ConnectionStateListener listener)
public static void syncPath(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path)
public void mkdirsImpl(org.apache.storm.shade.org.apache.curator.framework.CuratorFramework zk, String path, List<org.apache.storm.shade.org.apache.zookeeper.data.ACL> acls)
Copyright © 2022 The Apache Software Foundation. All rights reserved.