public boolean nodeExists ( String path ) throws ZooKeeperException { try { Stat stat = curatorFramework . checkExists ( ) . forPath ( path ) ; return stat != null ; } catch ( Exception e ) { if ( e instanceof ZooKeeperException ) { throw ( ZooKeeperException ) e ; } else { throw new ZooKeeperException ( e ) ; } } }
Checks if a path exists .