Package 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
Modifier and Type
Field
Description
`static final long`
`BARRIER_WAIT_TIME_MS`
Time limit for tasks waiting on the barrier.
`static final long`
`EXPECTED_FAIL_TIME_MS`
Time to wait for something which is expected not to happen (e.g.
`static final long`
`WAIT_TIME_MS`
Time to wait for something which is expected to happen (e.g.

## Constructor Summary

Constructors
Constructor
Description
`Barrier()`

## Method Summary

Modifier and Type
Method
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()`

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

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

## Field Details

### 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 Details

### Barrier

public Barrier()

## Method Details

### 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