A pool for threads.
A specialization of Executor interface that provides reporting methods (eg getThreads())
and the option of configuration methods (e.g. @link SizedThreadPool#setMaxThreads(int)).
| Modifier and Type | Class and Description |
|---|---|
| public 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 |
|---|---|
| public int | |
| public int | |
| public boolean | |
| public void |
| getIdleThreads | back to summary |
|---|---|
public int getIdleThreads()
| |
| getThreads | back to summary |
|---|---|
public int getThreads()
| |
| isLowOnThreads | back to summary |
|---|---|
public boolean isLowOnThreads()
| |
| join | back to summary |
|---|---|
| public void join() throws InterruptedException Blocks until the thread pool is
| |
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 |
|---|---|
| public int | |
| public int | |
| public default ThreadPoolBudget | Returns: a ThreadPoolBudget for this sized thread pool, or null of no ThreadPoolBudget can be returned
|
| public void | |
| public void |
| getMaxThreads | back to summary |
|---|---|
public int getMaxThreads()
| |
| getMinThreads | back to summary |
|---|---|
public int getMinThreads()
| |
| getThreadPoolBudget | back to summary |
|---|---|
public default ThreadPoolBudget getThreadPoolBudget()
| |
| setMaxThreads | back to summary |
|---|---|
public void setMaxThreads(int threads)
| |
| setMinThreads | back to summary |
|---|---|
public void setMinThreads(int threads)
| |