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

@ApplicationScoped public class BulkheadMetricBean extends Object
  • 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