public class CuratorUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_ZNODE_BYTES |
Constructor and Description |
---|
CuratorUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
createIfNotExists(org.apache.curator.framework.CuratorFramework curatorFramework,
String path,
org.apache.zookeeper.CreateMode mode,
byte[] rawBytes,
int maxZnodeBytes)
Create znode if it does not already exist.
|
static void |
createOrSet(org.apache.curator.framework.CuratorFramework curatorFramework,
String path,
org.apache.zookeeper.CreateMode mode,
byte[] rawBytes,
int maxZnodeBytes)
Create znode if it does not already exist.
|
public static final int DEFAULT_MAX_ZNODE_BYTES
public static void createIfNotExists(org.apache.curator.framework.CuratorFramework curatorFramework, String path, org.apache.zookeeper.CreateMode mode, byte[] rawBytes, int maxZnodeBytes) throws Exception
curatorFramework
- curatorpath
- pathmode
- create moderawBytes
- payloadmaxZnodeBytes
- maximum payload sizeIllegalArgumentException
- if rawBytes.length > maxZnodeBytesException
- if Curator throws an Exceptionpublic static void createOrSet(org.apache.curator.framework.CuratorFramework curatorFramework, String path, org.apache.zookeeper.CreateMode mode, byte[] rawBytes, int maxZnodeBytes) throws Exception
curatorFramework
- curatorpath
- pathmode
- create moderawBytes
- payloadmaxZnodeBytes
- maximum payload sizeIllegalArgumentException
- if rawBytes.length > maxZnodeBytesException
- if Curator throws an ExceptionCopyright © 2011–2017. All rights reserved.