26 |
|
* <pre> |
27 |
|
* public class CustomThreadPoolExecutor extends ThreadPoolExecutor { |
28 |
|
* |
29 |
< |
* static class CustomTask<V> implements RunnableFuture<V> {...} |
29 |
> |
* static class CustomTask<V> implements RunnableFuture<V> {...} |
30 |
|
* |
31 |
< |
* <V> protected RunnableFuture<V> newTaskFor(Callable<V> c) { |
31 |
> |
* protected <V> RunnableFuture<V> newTaskFor(Callable<V> c) { |
32 |
|
* return new CustomTask<V>(c); |
33 |
|
* } |
34 |
< |
* <V> protected RunnableFuture<V> newTaskFor(Runnable r, V v) { |
34 |
> |
* protected <V> RunnableFuture<V> newTaskFor(Runnable r, V v) { |
35 |
|
* return new CustomTask<V>(r, v); |
36 |
|
* } |
37 |
|
* // ... add constructors, etc. |