public List < String > watchForChilds ( final String path ) { if ( _zookeeperEventThread != null && Thread . currentThread ( ) == _zookeeperEventThread ) { throw new IllegalArgumentException ( "Must not be done in the zookeeper event thread." ) ; } return retryUntilConnected ( new Callable < List < String > > ( ) { @ Override public List < String > call ( ) throws Exception { exists ( path , true ) ; try { return getChildren ( path , true ) ; } catch ( ZkNoNodeException e ) { // ignore, the "exists" watch will listen for the parent node to appear } return null ; } } ) ; }
Installs a child watch for the given path .