public class Barrier extends Object
Modifier and Type | Field and Description |
---|---|
static long |
BARRIER_WAIT_TIME_MS
Time limit for tasks waiting on the barrier.
|
static long |
EXPECTED_FAIL_TIME_MS
Time to wait for something which is expected not to happen (e.g.
|
static long |
WAIT_TIME_MS
Time to wait for something which is expected to happen (e.g.
|
Constructor and Description |
---|
Barrier() |
Modifier and Type | Method and Description |
---|---|
static void |
assertAllNotAwaiting(Collection<? extends Barrier> barriers)
Assert that no task waits on any of a set of barriers within EXPECTED_FAIL_TIME_MS
|
void |
assertAwaits()
Assert that at least one task awaits on this barrier within WAIT_TIME_MS
|
void |
assertNotAwaiting()
Assert that no task awaits this barrier within EXPECTED_FAIL_TIME_MS
|
void |
await() |
void |
awaitInterruptably() |
int |
countWaiting() |
void |
open() |
public static final long BARRIER_WAIT_TIME_MS
public static final long EXPECTED_FAIL_TIME_MS
public static final long WAIT_TIME_MS
public void await()
public void awaitInterruptably() throws InterruptedException
InterruptedException
public void open()
public int countWaiting()
public void assertAwaits()
public void assertNotAwaiting()
public static void assertAllNotAwaiting(Collection<? extends Barrier> barriers)
barriers
- the barriers to checkCopyright © 2016 – 2021 Eclipse Foundation. All rights reserved.
Use is subject to license terms.