java.util.concurrent.ExecutorThreadPool.SizedThreadPoolExecutorSizedThreadPool, ExecutorThreadPool, MonitoredQueuedThreadPool, QueuedThreadPool@ManagedObject("Pool of Threads") public interface ThreadPool extends java.util.concurrent.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 | 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 | Description |
|---|---|---|
int |
getIdleThreads() |
|
int |
getThreads() |
|
boolean |
isLowOnThreads() |
|
void |
join() |
Blocks until the thread pool is
stopped. |
void join() throws java.lang.InterruptedException
stopped.java.lang.InterruptedException - if thread was interrupted@ManagedAttribute("number of threads in pool") int getThreads()
@ManagedAttribute("number of idle threads in pool") int getIdleThreads()
@ManagedAttribute("indicates the pool is low on available threads") boolean isLowOnThreads()
Copyright © 1995–2018 Webtide. All rights reserved.