156 |
|
* returned executor is guaranteed not to be reconfigurable to use |
157 |
|
* additional threads. |
158 |
|
* |
159 |
< |
* @param threadFactory the factory to use when creating new |
160 |
< |
* threads |
161 |
< |
* |
159 |
> |
* @param threadFactory the factory to use when creating new threads |
160 |
|
* @return the newly created single-threaded Executor |
161 |
|
* @throws NullPointerException if threadFactory is null |
162 |
|
*/ |
195 |
|
* will reuse previously constructed threads when they are |
196 |
|
* available, and uses the provided |
197 |
|
* ThreadFactory to create new threads when needed. |
198 |
+ |
* |
199 |
|
* @param threadFactory the factory to use when creating new threads |
200 |
|
* @return the newly created thread pool |
201 |
|
* @throws NullPointerException if threadFactory is null |
218 |
|
* given time. Unlike the otherwise equivalent |
219 |
|
* {@code newScheduledThreadPool(1)} the returned executor is |
220 |
|
* guaranteed not to be reconfigurable to use additional threads. |
221 |
+ |
* |
222 |
|
* @return the newly created scheduled executor |
223 |
|
*/ |
224 |
|
public static ScheduledExecutorService newSingleThreadScheduledExecutor() { |
237 |
|
* equivalent {@code newScheduledThreadPool(1, threadFactory)} |
238 |
|
* the returned executor is guaranteed not to be reconfigurable to |
239 |
|
* use additional threads. |
240 |
< |
* @param threadFactory the factory to use when creating new |
241 |
< |
* threads |
242 |
< |
* @return a newly created scheduled executor |
240 |
> |
* |
241 |
> |
* @param threadFactory the factory to use when creating new threads |
242 |
> |
* @return the newly created scheduled executor |
243 |
|
* @throws NullPointerException if threadFactory is null |
244 |
|
*/ |
245 |
|
public static ScheduledExecutorService newSingleThreadScheduledExecutor(ThreadFactory threadFactory) { |
252 |
|
* given delay, or to execute periodically. |
253 |
|
* @param corePoolSize the number of threads to keep in the pool, |
254 |
|
* even if they are idle |
255 |
< |
* @return a newly created scheduled thread pool |
255 |
> |
* @return the newly created scheduled thread pool |
256 |
|
* @throws IllegalArgumentException if {@code corePoolSize < 0} |
257 |
|
*/ |
258 |
|
public static ScheduledExecutorService newScheduledThreadPool(int corePoolSize) { |
266 |
|
* even if they are idle |
267 |
|
* @param threadFactory the factory to use when the executor |
268 |
|
* creates a new thread |
269 |
< |
* @return a newly created scheduled thread pool |
269 |
> |
* @return the newly created scheduled thread pool |
270 |
|
* @throws IllegalArgumentException if {@code corePoolSize < 0} |
271 |
|
* @throws NullPointerException if threadFactory is null |
272 |
|
*/ |