Class BulkheadMetricBean
java.lang.Object
org.eclipse.microprofile.fault.tolerance.tck.metrics.common.BulkheadMetricBean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidWait forfutureto be completedwaitForAsync(Future<?> future) WaitFor method for testing async callsvoidwaitForHistogram(Future<?> future) Separate waitFor method for testing execution time histogramvoidwaitForRunningExecutions(int executions) Wait for the given number of method executions to be running in this bean
-
Constructor Details
-
BulkheadMetricBean
public BulkheadMetricBean()
-
-
Method Details
-
waitFor
Wait forfutureto be completed- Parameters:
future- to complete
-
waitForHistogram
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 beanThis method will wait three seconds before returning an exception
- Parameters:
executions- number of executions
-