org.apache.curator.utils
Class PathUtils

java.lang.Object
  extended by org.apache.curator.utils.PathUtils

public class PathUtils
extends Object

This class is copied from Apache ZooKeeper. The original class is not exported by ZooKeeper bundle and thus it can't be used in OSGi. See issue: https://issues.apache.org/jira/browse/ZOOKEEPER-1627 A temporary workaround till the issue is resolved is to keep a copy of this class locally.


Constructor Summary
PathUtils()
           
 
Method Summary
static String validatePath(String path)
          Validate the provided znode path string
static void validatePath(String path, boolean isSequential)
          validate the provided znode path string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PathUtils

public PathUtils()
Method Detail

validatePath

public static void validatePath(String path,
                                boolean isSequential)
                         throws IllegalArgumentException
validate the provided znode path string

Parameters:
path - znode path string
isSequential - if the path is being created with a sequential flag
Throws:
IllegalArgumentException - if the path is invalid

validatePath

public static String validatePath(String path)
                           throws IllegalArgumentException
Validate the provided znode path string

Parameters:
path - znode path string
Returns:
The given path if it was valid, for fluent chaining
Throws:
IllegalArgumentException - if the path is invalid


Copyright © 2011–2014 The Apache Software Foundation. All rights reserved.