36 |
|
} |
37 |
|
public boolean isCancelled() { return task.isCancelled(); } |
38 |
|
public boolean isDone() { return task.isDone(); } |
39 |
< |
public V get() throws InterruptedException, ExecutionException { |
39 |
> |
public V get() throws InterruptedException, ExecutionException { |
40 |
|
V v = task.get(); |
41 |
|
assertTrue(ran); |
42 |
|
return v; |
43 |
|
} |
44 |
< |
public V get(long time, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { |
44 |
> |
public V get(long time, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException { |
45 |
|
V v = task.get(time, unit); |
46 |
|
assertTrue(ran); |
47 |
|
return v; |
57 |
|
protected <V> RunnableScheduledFuture<V> decorateTask(Callable<V> c, RunnableScheduledFuture<V> task) { |
58 |
|
return new CustomTask<V>(task); |
59 |
|
} |
60 |
< |
CustomExecutor(int corePoolSize) { super(corePoolSize);} |
60 |
> |
CustomExecutor(int corePoolSize) { super(corePoolSize); } |
61 |
|
CustomExecutor(int corePoolSize, RejectedExecutionHandler handler) { |
62 |
|
super(corePoolSize, handler); |
63 |
|
} |