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.
|
static boolean |
isChildAdded(org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent event) |
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 Exceptionpublic static boolean isChildAdded(org.apache.curator.framework.recipes.cache.PathChildrenCacheEvent event)
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.