|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.talend.esb.servicelocator.client.internal.NodePath
public class NodePath
Representation of a ZooKeeper node path. The path is always absolute. As node names in ZooKeeper must not
contain the path separator ("/") NodePath takes care to encode the names,
so they can be stored in ZooKeeper.
| Field Summary | |
|---|---|
static char |
SEPARATOR
|
| Constructor Summary | |
|---|---|
protected |
NodePath(NodePath parentPath,
String childPathSegment)
|
protected |
NodePath(NodePath parentPath,
String childPathSegment,
boolean encoded)
|
|
NodePath(String... pathSegments)
Create an NodePath that consists of the given path segments. |
| Method Summary | |
|---|---|
NodePath |
child(String childNodeName)
Create a NodePath, which is a child of this one. |
protected NodePath |
child(String childNodeName,
boolean encoded)
Create a NodePath, which is a child of this one. |
static String |
decode(String encoded)
Decode the given String. |
static String |
encode(String raw)
Encode the given String. |
boolean |
equals(Object obj)
|
String |
getNodeName()
|
int |
hashCode()
|
String |
toString()
Encoded String representation of this NodePath. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final char SEPARATOR
| Constructor Detail |
|---|
public NodePath(String... pathSegments)
NodePath that consists of the given path segments.
pathSegments - the sequence of path segments the NodePath consists of, must not be null or empty
protected NodePath(NodePath parentPath,
String childPathSegment)
protected NodePath(NodePath parentPath,
String childPathSegment,
boolean encoded)
| Method Detail |
|---|
public NodePath child(String childNodeName)
NodePath, which is a child of this one.
childNodeName - name of the child node, must not be null
protected NodePath child(String childNodeName,
boolean encoded)
NodePath, which is a child of this one.
childNodeName - name of the child node, must not be nullpublic boolean equals(Object obj)
equals in class Objectpublic String getNodeName()
public int hashCode()
hashCode in class Objectpublic String toString()
String representation of this NodePath.
toString in class ObjectString representationpublic static String encode(String raw)
String. All occurrences of "/" are mapped to "%2A" and all occurrences of
"%" to "%2F".
raw - the String to encode, must not be null
decode(String)public static String decode(String encoded)
String. It is the inverse operation of encode(String). For all
Strings s, decode(encode(s)).equals(s) should be
true.
encoded - the String to decode, must not be null
encode(String)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||