Class BoundedExecutor
java.lang.Object
com.atlassian.jira.util.concurrent.BoundedExecutor
- All Implemented Interfaces:
Executor
BoundedExecutor is an ExecutorService wrapper that bounds the number of runnables
allowed in the execution queue.
execute(Runnable)
blocks if the number
of runnables already in the queue equals the maximum number of permits available.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
shutdown the ExecutorService and wait for it.<T> Future
<T>
-
Constructor Details
-
BoundedExecutor
Constructor.- Parameters:
executor
- the executor service whose queue is to be bounded (required)permits
- the number of runnables allowed in the queue at once
-
-
Method Details