if(currentChildren>=total){
//we've finished, so let's clear and return
ZkUtils.safeCreate(zk,getClearedPath(),emptyNode,privileges,CreateMode.PERSISTENT);
return;
}
else if(localCount.get()>barrierChildren.size())throw new BrokenBarrierException();
else{
localCount.set(barrierChildren.size());
/*
we know that the barrierChildren's size is at least as large as the local count,
but it isn't large enough to finish yet.