org.eclipse.microprofile.fault.tolerance.tck.metrics

## Class BulkheadMetricBean

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.metrics.BulkheadMetricBean

    @ApplicationScoped
    public class BulkheadMetricBean
    extends Object

### Constructor Summary

Constructors
Constructor and Description
`BulkheadMetricBean()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `waitFor(Future<?> future)` Wait for `future` to be completed
`Future<Void>` `waitForAsync(Future<?> future)` WaitFor method for testing async calls
`void` `waitForHistogram(Future<?> future)` Separate waitFor method for testing execution time histogram
`void` `waitForRunningExecutions(int executions)` Wait for the given number of method executions to be running in this bean

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

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

### Constructor Detail

#### BulkheadMetricBean

    public BulkheadMetricBean()

### Method Detail

#### waitFor

    @Bulkhead(value=2)
    public void waitFor(Future<?> future)

Wait for `future` to be completed

Parameters:
  `future` - to complete

#### waitForHistogram

    @Bulkhead(value=2)
    public void waitForHistogram(Future<?> future)

Separate waitFor method for testing execution time histogram

Parameters:
  `future` - to complete

#### waitForAsync

    @Asynchronous
     @Bulkhead(value=2,
              waitingTaskQueue=2)
    public Future<Void> waitForAsync(Future<?> future)

WaitFor method for testing async calls

Parameters:
  `future` - to complete
Returns:
  a completed future set to null

#### waitForRunningExecutions

    public void waitForRunningExecutions(int executions)

Wait for the given number of method executions to be running in this bean

This method will wait three seconds before returning an exception

Parameters:
  `executions` - number of executions