Package org.apache.uima.aae
Class UimaBlockingExecutor
java.lang.Object
org.apache.uima.aae.UimaBlockingExecutor
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.
-
Constructor Summary
ConstructorsConstructorDescriptionUimaBlockingExecutor
(ThreadPoolExecutor executor, int permits) UimaBlockingExecutor
(ThreadPoolExecutor executor, int permits, String destination) -
Method Summary
-
Constructor Details
-
UimaBlockingExecutor
-
UimaBlockingExecutor
-
-
Method Details
-
isReady
public boolean isReady() -
stop
public void stop() -
submitTask
-