code: public boolean leave() throws KeeperException, InterruptedException{
  		zooKeeper.delete(rootPath + "/" + name, 0);
  		while (true) {
  			synchronized (mutex) {
  				List<String> list = zooKeeper.getChildren(rootPath, true);
  				if (list.size() > 0) {
  					mutex.wait();
  				} else {
  					return true;
  				}
  			}
  		}
  	}
docs: Wait until all nodes leave barrier
  
  @return true when required all nodes have left barrier, else wait.
  @throws KeeperException      If a keeper exception occurred
  @throws InterruptedException If interrupted