code: public boolean enter() throws KeeperException, InterruptedException{
  		zooKeeper.create(rootPath + "/" + name, new byte[0], Ids.OPEN_ACL_UNSAFE, CreateMode.EPHEMERAL);
  		while (true) {
  			synchronized (mutex) {
  				List<String> list = zooKeeper.getChildren(rootPath, true);
  
  				if (list.size() < size) {
  					mutex.wait();
  				} else {
  					return true;
  				}
  			}
  		}
  	}
docs: Wait until required number of nodes join barrier
  
  @return true when required number of nodes have entered barrier, else wait
  @throws KeeperException      If a keeper exception occurred
  @throws InterruptedException If interrupted