An implementation of the Distributed Barrier ZK recipe.
Distributed systems use barriers to block processing of a set of nodes until a condition is met at which time all the nodes are allowed to proceed.
public DistributedBarrier(CuratorFramework client, String barrierPath) Parameters: client - client barrierPath - path to use as the barrier
To wait on the barrier:
public void waitOnBarrier()
There are utilities for setting/removing the barrier:
DistributedBarrier instances watch for connection loss and will throw an exception from waitOnBarrier().