Class UimaBlockingExecutor

java.lang.Object
org.apache.uima.aae.UimaBlockingExecutor

public class UimaBlockingExecutor extends Object
A wrapper around ThreadPoolExecutor that blocks a thread if number of executing threads exceeds provided maximum number of permits. The implementation uses a semaphore that is initialized with a max number of permits. Each thread grabs a permit and executes. If all permits are exhausted, a thread blocks on a semaphore until a permit is available.