58 |
|
* core and maximum pool sizes are set only upon construction, but they |
59 |
|
* may also be changed dynamically using {@link |
60 |
|
* ThreadPoolExecutor#setCorePoolSize} and {@link |
61 |
< |
* ThreadPoolExecutor#setMaximumPoolSize}. <dd> |
61 |
> |
* ThreadPoolExecutor#setMaximumPoolSize}. </dd> |
62 |
|
* |
63 |
< |
* <dt> On-demand construction |
63 |
> |
* <dt>On-demand construction</dt> |
64 |
|
* |
65 |
|
* <dd> By default, even core threads are initially created and |
66 |
|
* started only when new tasks arrive, but this can be overridden |
466 |
|
* @param workQueue the queue to use for holding tasks before they |
467 |
|
* are executed. This queue will hold only the <tt>Runnable</tt> |
468 |
|
* tasks submitted by the <tt>execute</tt> method. |
469 |
< |
* @throws IllegalArgumentException if corePoolSize, or |
469 |
> |
* @throws IllegalArgumentException if corePoolSize or |
470 |
|
* keepAliveTime less than zero, or if maximumPoolSize less than or |
471 |
|
* equal to zero, or if corePoolSize greater than maximumPoolSize. |
472 |
|
* @throws NullPointerException if <tt>workQueue</tt> is null |
498 |
|
* tasks submitted by the <tt>execute</tt> method. |
499 |
|
* @param threadFactory the factory to use when the executor |
500 |
|
* creates a new thread. |
501 |
< |
* @throws IllegalArgumentException if corePoolSize, or |
501 |
> |
* @throws IllegalArgumentException if corePoolSize or |
502 |
|
* keepAliveTime less than zero, or if maximumPoolSize less than or |
503 |
|
* equal to zero, or if corePoolSize greater than maximumPoolSize. |
504 |
|
* @throws NullPointerException if <tt>workQueue</tt> |
532 |
|
* tasks submitted by the <tt>execute</tt> method. |
533 |
|
* @param handler the handler to use when execution is blocked |
534 |
|
* because the thread bounds and queue capacities are reached. |
535 |
< |
* @throws IllegalArgumentException if corePoolSize, or |
535 |
> |
* @throws IllegalArgumentException if corePoolSize or |
536 |
|
* keepAliveTime less than zero, or if maximumPoolSize less than or |
537 |
|
* equal to zero, or if corePoolSize greater than maximumPoolSize. |
538 |
|
* @throws NullPointerException if <tt>workQueue</tt> |
568 |
|
* creates a new thread. |
569 |
|
* @param handler the handler to use when execution is blocked |
570 |
|
* because the thread bounds and queue capacities are reached. |
571 |
< |
* @throws IllegalArgumentException if corePoolSize, or |
571 |
> |
* @throws IllegalArgumentException if corePoolSize or |
572 |
|
* keepAliveTime less than zero, or if maximumPoolSize less than or |
573 |
|
* equal to zero, or if corePoolSize greater than maximumPoolSize. |
574 |
|
* @throws NullPointerException if <tt>workQueue</tt> |
1218 |
|
* period after shutdown may indicate that submitted tasks have |
1219 |
|
* ignored or suppressed interruption, causing this executor not |
1220 |
|
* to properly terminate. |
1221 |
< |
* @return true if terminating but not yet terminated. |
1221 |
> |
* @return true if terminating but not yet terminated |
1222 |
|
*/ |
1223 |
|
public boolean isTerminating() { |
1224 |
|
return runState == STOP; |
1493 |
|
|
1494 |
|
/** |
1495 |
|
* Returns the thread keep-alive time, which is the amount of time |
1496 |
< |
* which threads in excess of the core pool size may remain |
1496 |
> |
* that threads in excess of the core pool size may remain |
1497 |
|
* idle before being terminated. |
1498 |
|
* |
1499 |
|
* @param unit the desired time unit of the result |