76 |
|
/** |
77 |
|
* Creates an Executor that uses a single worker thread operating |
78 |
|
* off an unbounded queue, and uses the provided ThreadFactory to |
79 |
< |
* create a new thread when needed. The returned executor cannot be |
80 |
< |
* reconfigured to use additional threads. |
79 |
> |
* create a new thread when needed. Unlike the otherwise |
80 |
> |
* equivalent <tt>newFixedThreadPool(1)</tt> the returned executor |
81 |
> |
* is guaranteed not to be reconfigurable to use additional |
82 |
> |
* threads. |
83 |
> |
* |
84 |
|
* @param threadFactory the factory to use when creating new |
85 |
|
* threads |
86 |
|
* |
313 |
|
* A wrapper class that exposes only the ExecutorService methods |
314 |
|
* of an implementation. |
315 |
|
*/ |
316 |
< |
private static class DelegatedExecutorService extends AbstractExecutorService { |
316 |
> |
static class DelegatedExecutorService extends AbstractExecutorService { |
317 |
|
private final ExecutorService e; |
318 |
|
DelegatedExecutorService(ExecutorService executor) { e = executor; } |
319 |
|
public void execute(Runnable command) { e.execute(command); } |
386 |
|
* A wrapper class that exposes only the ExecutorService and |
387 |
|
* ScheduleExecutor methods of a ScheduledThreadPoolExecutor. |
388 |
|
*/ |
389 |
< |
private static class DelegatedScheduledExecutorService |
389 |
> |
static class DelegatedScheduledExecutorService |
390 |
|
extends DelegatedExecutorService |
391 |
|
implements ScheduledExecutorService { |
392 |
|
private final ScheduledExecutorService e; |