29 |
|
* <tt>corePoolSize</tt> threads and an unbounded queue, adjustments |
30 |
|
* to <tt>maximumPoolSize</tt> have no useful effect. |
31 |
|
* |
32 |
< |
* <p>This class supports protected extension method |
32 |
> |
* <p><b>Extension notes:</b> This class overrides {@link |
33 |
> |
* AbstractExecutorService} <tt>submit</tt> methods to generate |
34 |
> |
* internal objects to control per-task delays and scheduling. To |
35 |
> |
* preserve functionality, any further overrides of these methods in |
36 |
> |
* subclasses must invoke superclass versions, which effectively |
37 |
> |
* disables additional task customization. However, this class |
38 |
> |
* provides alternative protected extension method |
39 |
|
* <tt>decorateTask</tt> (one version each for <tt>Runnable</tt> and |
40 |
|
* <tt>Callable</tt>) that can be used to customize the concrete task |
41 |
< |
* types used to execute commands. By default, |
42 |
< |
* a <tt>ScheduledThreadPoolExecutor</tt> uses |
43 |
< |
* a task type extending {@link FutureTask}. However, this may |
44 |
< |
* be modified or replaced using subclasses of the form: |
45 |
< |
* <pre> |
41 |
> |
* types used to execute commands entered via <tt>execute</tt>, |
42 |
> |
* <tt>submit</tt>, <tt>schedule</tt>, <tt>scheduleAtFixedRate</tt>, |
43 |
> |
* and <tt>scheduleWithFixedDelay</tt>. By default, a |
44 |
> |
* <tt>ScheduledThreadPoolExecutor</tt> uses a task type extending |
45 |
> |
* {@link FutureTask}. However, this may be modified or replaced using |
46 |
> |
* subclasses of the form: |
47 |
> |
* |
48 |
> |
* <pre> |
49 |
|
* public class CustomScheduledExecutor extends ScheduledThreadPoolExecutor { |
50 |
|
* |
51 |
|
* static class CustomTask<V> implements RunnableScheduledFuture<V> { ... } |