T - R - public final class DefaultExecutionEngine<T,R> extends Object implements ExecutionEngine<T,R>
| Constructor and Description |
|---|
DefaultExecutionEngine(ExecutorService executorService)
Creates the default instance given @ExecutorService, internally it uses @CompletionService
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isShutdown()
Returns true if this executor has been shut down.
|
Future<Node<T,R>> |
submit(Callable<Node<T,R>> task)
Submits a value-returning task for execution and returns a Future
representing the pending results of the task.
|
Future<Node<T,R>> |
take()
Retrieves and removes the Future representing the next
completed task, waiting if none are yet present.
|
String |
toString() |
public DefaultExecutionEngine(ExecutorService executorService)
executorService - public Future<Node<T,R>> submit(Callable<Node<T,R>> task)
ExecutionEnginesubmit in interface ExecutionEngine<T,R>task - the task to submitpublic Future<Node<T,R>> take() throws InterruptedException
ExecutionEnginetake in interface ExecutionEngine<T,R>InterruptedException - if interrupted while waitingpublic boolean isShutdown()
ExecutionEngineisShutdown in interface ExecutionEngine<T,R>Copyright © 2016 Dexecutor. All rights reserved.