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

# Class BulkheadMetricBean

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

@ApplicationScoped public class BulkheadMetricBean extends Object

## Constructor Summary

Constructors
Constructor
Description
`BulkheadMetricBean()`

## Method Summary

Modifier and Type
Method
Description
`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 Details

### BulkheadMetricBean

public BulkheadMetricBean()

## Method Details

### waitFor

@Bulkhead(2) public void waitFor(Future<?> future)
Wait for `future` to be completed

Parameters:
  `future` - to complete

### waitForHistogram

@Bulkhead(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