/**
  * Set a node's data asynchronously.
  *
  * @param path
  * @param data
  * @param version
  * @param callback
  */
 public void setData(Object path, Object data, int version, final Closure callback) {
   zookeeper.setData(
       getPathAsString(path),
       serialize(data),
       version,
       new AsyncCallback.StatCallback() {
         public void processResult(int rc, String path, Object ctx, Stat stat) {
           callback.setDelegate(ctx);
           callback.setProperty("returnCode", rc);
           callback.setProperty("path", path);
           callback.call(stat);
         }
       },
       this);
 }
 /**
  * Set a node's data.
  *
  * @param path
  * @param data
  * @param version
  * @return
  * @throws InterruptedException
  * @throws KeeperException
  */
 public Stat setData(Object path, Object data, int version)
     throws InterruptedException, KeeperException {
   return zookeeper.setData(getPathAsString(path), serialize(data), version);
 }