Modifier and Type | Class and Description |
---|---|
class |
SubtaskExecutor.SyncFutureTask<V> |
Modifier and Type | Field and Description |
---|---|
protected Executor |
executor |
protected Condition |
mutex |
protected boolean |
shutdown |
protected ReentrantLock |
sync |
protected Deque<SubtaskExecutor.SyncFutureTask<?>> |
tasks |
Constructor and Description |
---|
SubtaskExecutor(Executor executor) |
Modifier and Type | Method and Description |
---|---|
void |
await(Future<?> future) |
<V> V |
call(Callable<V> task) |
void |
call(Runnable task) |
<V> V |
call(Runnable task,
V result) |
void |
execute(Runnable command) |
Executor |
getExecutor() |
void |
shutdown() |
void |
shutdownNow() |
<V> SubtaskExecutor.SyncFutureTask<V> |
submit(Callable<V> task) |
SubtaskExecutor.SyncFutureTask<?> |
submit(Runnable task) |
<V> SubtaskExecutor.SyncFutureTask<V> |
submit(Runnable task,
V result) |
protected Executor executor
protected Deque<SubtaskExecutor.SyncFutureTask<?>> tasks
protected ReentrantLock sync
protected Condition mutex
protected boolean shutdown
public SubtaskExecutor(Executor executor)
public void shutdown()
public void shutdownNow()
public SubtaskExecutor.SyncFutureTask<?> submit(Runnable task)
public <V> SubtaskExecutor.SyncFutureTask<V> submit(Runnable task, V result)
public <V> SubtaskExecutor.SyncFutureTask<V> submit(Callable<V> task)
public void await(Future<?> future) throws InterruptedException
InterruptedException
public void call(Runnable task) throws ExecutionException, InterruptedException
public <V> V call(Runnable task, V result) throws ExecutionException, InterruptedException
public <V> V call(Callable<V> task) throws ExecutionException, InterruptedException
public Executor getExecutor()
Copyright © 2015. All rights reserved.