@ManagedObject(value="Pool of Threads") public interface ThreadPool extends Executor
A pool for threads.
A specialization of Executor interface that provides reporting methods (eg getThreads()
)
and the option of configuration methods (e.g. @link ThreadPool.SizedThreadPool.setMaxThreads(int)
).
Modifier and Type | Interface and Description |
---|---|
static interface |
ThreadPool.SizedThreadPool
Specialized sub-interface of ThreadPool that allows to get/set
the minimum and maximum number of threads of the pool.
|
Modifier and Type | Method and Description |
---|---|
int |
getIdleThreads() |
int |
getThreads() |
boolean |
isLowOnThreads() |
void |
join()
Blocks until the thread pool is
stopped . |
void join() throws InterruptedException
stopped
.InterruptedException
- if thread was interrupted@ManagedAttribute(value="number of threads in pool") int getThreads()
@ManagedAttribute(value="number of idle threads in pool") int getIdleThreads()
@ManagedAttribute(value="indicates the pool is low on available threads") boolean isLowOnThreads()
Copyright © 2010 - 2020 Adobe. All Rights Reserved