|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.netflix.curator.framework.recipes.barriers.DistributedBarrier
public class DistributedBarrier
A barrier as described in the ZK recipes. Quoting the 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
| Constructor Summary | |
|---|---|
DistributedBarrier(com.netflix.curator.framework.CuratorFramework client,
java.lang.String barrierPath)
|
|
| Method Summary | |
|---|---|
void |
removeBarrier()
Utility to remove the barrier node |
void |
setBarrier()
Utility to set the barrier node |
void |
waitOnBarrier()
Blocks until the barrier node comes into existence |
boolean |
waitOnBarrier(long maxWait,
java.util.concurrent.TimeUnit unit)
Blocks until the barrier no longer exists or the timeout elapses |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DistributedBarrier(com.netflix.curator.framework.CuratorFramework client,
java.lang.String barrierPath)
client - clientbarrierPath - path to use as the barrier| Method Detail |
|---|
public void setBarrier()
throws java.lang.Exception
java.lang.Exception - errors
public void removeBarrier()
throws java.lang.Exception
java.lang.Exception - errors
public void waitOnBarrier()
throws java.lang.Exception
java.lang.Exception - errors
public boolean waitOnBarrier(long maxWait,
java.util.concurrent.TimeUnit unit)
throws java.lang.Exception
maxWait - max time to blockunit - time unit
java.lang.Exception - errors
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||