org.eclipse.microprofile.fault.tolerance.tck.util

## Class ConcurrentExecutionTracker

- java.lang.Object
- - org.eclipse.microprofile.fault.tolerance.tck.util.ConcurrentExecutionTracker

    @Dependent
    public class ConcurrentExecutionTracker
    extends Object

Utility bean to track the number of concurrent executions of a method

The method being tracked needs to call `executionStarted()` when it starts and `executionEnded()` when it's about to end.

     try {
         tracker.executionStarted();
         // whatever the method is meant to do
     }
     finally {
         tracker.executionEnded()
     }

Another method can then call `waitForRunningExecutions(int)` to wait for the expected number of executions to start.

### Constructor Summary

Constructors
Constructor and Description
`ConcurrentExecutionTracker()`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `executionEnded()`
`void` `executionStarted()`
`void` `waitForRunningExecutions(int executions)` Wait for the given number of method executions to be running

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

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

### Constructor Detail

#### ConcurrentExecutionTracker

    public ConcurrentExecutionTracker()

### Method Detail

#### waitForRunningExecutions

    public void waitForRunningExecutions(int executions)

Wait for the given number of method executions to be running

This method will wait three seconds before returning an exception

Parameters:
  `executions` - number of executions

#### executionStarted

    public void executionStarted()

#### executionEnded

    public void executionEnded()