more work on the roundrobin tests
This commit is contained in:
parent
f18958422e
commit
a4102d516b
1 changed files with 8 additions and 0 deletions
|
|
@ -65,6 +65,14 @@ class ZooKeeperBarrier(zkClient: ZkClient, name: String, node: String, count: In
|
|||
leave()
|
||||
}
|
||||
|
||||
/**
|
||||
* An await does a enter/leave making this barrier a 'single' barrier instead of a double barrier.
|
||||
*/
|
||||
def await() {
|
||||
enter
|
||||
leave()
|
||||
}
|
||||
|
||||
def enter = {
|
||||
zkClient.createEphemeral(entry)
|
||||
if (zkClient.countChildren(barrier) >= count)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue