public class ZkNodeProps extends Object implements JSONWriter.Writable
| Constructor and Description |
|---|
ZkNodeProps(Map<String,String> propMap)
Construct ZKNodeProps from map.
|
ZkNodeProps(String... keyVals)
Constructor that populates the from array of Strings in form key1, value1,
key2, value2, ..., keyN, valueN
|
ZkNodeProps(ZkNodeProps zkNodeProps)
Construct ZKNodeProps from information of an existingZKNodeProps.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsKey(String key)
Check if property key exists.
|
String |
get(String key)
Get property value.
|
Map<String,String> |
getProperties()
Get all properties as map.
|
Set<String> |
keySet()
Get property keys.
|
static ZkNodeProps |
load(byte[] bytes)
Create ZkNodeProps from json string that is typically stored in zookeeper.
|
String |
toString() |
void |
write(JSONWriter jsonWriter) |
public ZkNodeProps(ZkNodeProps zkNodeProps)
public ZkNodeProps(String... keyVals)
public static ZkNodeProps load(byte[] bytes)
public void write(JSONWriter jsonWriter)
write in interface JSONWriter.Writablepublic boolean containsKey(String key)
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.