org.eclipse.microprofile.fault.tolerance.tck.util

## Class Barrier

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.util.Barrier

    public class Barrier
    extends Object

### Field Summary

Fields
`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 Summary

Constructors
Constructor and Description
`Barrier()`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`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()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### BARRIER_WAIT_TIME_MS

    public static final long BARRIER_WAIT_TIME_MS

Time limit for tasks waiting on the barrier.

#### EXPECTED_FAIL_TIME_MS

    public static final long EXPECTED_FAIL_TIME_MS

Time to wait for something which is expected not to happen (e.g. assert that a task does not complete)

#### WAIT_TIME_MS

    public static final long WAIT_TIME_MS

Time to wait for something which is expected to happen (e.g. assert that a task completes)

### Constructor Detail

#### Barrier

    public Barrier()

### Method Detail

#### await

    public void await()

#### awaitInterruptably

    public void awaitInterruptably()
                            throws InterruptedException

Throws:
  `InterruptedException`

#### open

    public void open()

#### countWaiting

    public int countWaiting()

#### assertAwaits

    public void assertAwaits()

Assert that at least one task awaits on this barrier within WAIT_TIME_MS

#### assertNotAwaiting

    public void assertNotAwaiting()

Assert that no task awaits this barrier within EXPECTED_FAIL_TIME_MS

#### assertAllNotAwaiting

    public static void assertAllNotAwaiting(Collection<? extends Barrier> barriers)

Assert that no task waits on any of a set of barriers within EXPECTED_FAIL_TIME_MS

Parameters:
  `barriers` - the barriers to check