[
https://issues.apache.org/jira/browse/CURATOR-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14066233#comment-14066233
]
ASF GitHub Bot commented on CURATOR-33:
---------------------------------------
Github user ericzundel commented on a diff in the pull request:
https://github.com/apache/curator/pull/17#discussion_r15104749
--- Diff:
curator-client/src/main/java/org/apache/curator/utils/ZKPaths.java ---
@@ -112,6 +113,34 @@ public static PathAndNode getPathAndNode(String path)
}
/**
+ * Given a full path, return the the individual parts, without slashes.
+ * The root path will return an empty list.
+ *
+ * @param path the path
+ * @return an array of parts
+ */
+ public static List<String> split(String path)
+ {
+ PathUtils.validatePath(path);
+ if (path.length() == 1) {
+ return Collections.emptyList();
+ }
+ int lastPos = 1;
+ List<String> parts = new ArrayList<String>();
+ while (true)
+ {
+ int nextPos = path.indexOf('/', lastPos);
--- End diff --
Do you want to use file.separator system property (or File.separatorChar)
> Recursive Node Cache
> --------------------
>
> Key: CURATOR-33
> URL: https://issues.apache.org/jira/browse/CURATOR-33
> Project: Apache Curator
> Issue Type: Improvement
> Components: Recipes
> Reporter: John Vines
> Fix For: awaiting-response
>
> Attachments: CURATOR-33.2.patch, CURATOR-33.patch
>
>
> Currently the PathChildrenCache will trigger listen events for all children
> at the given node. However, it would be useful to have a cache that would
> trigger listen events for the entire hierarchy below the given node.
--
This message was sent by Atlassian JIRA
(v6.2#6252)