@Override
  public WatchableTask<List<String>> getChildren(String path) {
    return new WatchableTask<List<String>>("zkGetChildren: " + path) {
      @Override
      protected Promise run(Context context) throws Throwable {
        SettablePromise<List<String>> promise = Promises.settable();
        _zkClient.getChildren(path, _watcher, (int rc, String p, Object ctx, List<String> children) -> {
          KeeperException.Code code = KeeperException.Code.get(rc);
          switch (code) {
            case OK:
              promise.done(children);
              break;
            default:
              promise.fail(KeeperException.create(code, p));
          }
        }, null);
        return promise;
      }
    };
  }
@Override
  public WatchableTask<List<String>> getChildren(String path) {
    return new WatchableTask<List<String>>("zkGetChildren: " + path) {
      @Override
      protected Promise run(Context context) throws Throwable {
        SettablePromise<List<String>> promise = Promises.settable();
        _zkClient.getChildren(path, _watcher, (int rc, String p, Object ctx, List<String> children) -> {
          KeeperException.Code code = KeeperException.Code.get(rc);
          switch (code) {
            case OK:
              promise.done(children);
              break;
            default:
              promise.fail(KeeperException.create(code, p));
          }
        }, null);
        return promise;
      }
    };
  }
@ Override public WatchableTask < List < String > > getChildren ( String path ) { return new WatchableTask < List < String > > ( "zkGetChildren: " + path ) { @ Override protected Promise run ( Context context ) throws Throwable { SettablePromise < List < String >> promise = Promises . settable ( ) ; _zkClient . getChildren ( path , _watcher , ( int rc , String p , Object ctx , List < String > children ) -> { KeeperException . Code code = KeeperException . Code . get ( rc ) ; switch ( code ) { case OK : promise . done ( children ) ; break ; default : promise . fail ( KeeperException . create ( code , p ) ) ; } } , null ) ; return promise ; } } ; }
{@inheritDoc}
{