T - Type of Node/Task IDR - Type of Node/Task resultpublic final class DefaultExecutionEngine<T extends Comparable<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 |
isAnyTaskInError() |
boolean |
isDistributed()
Hints dexecutor if the execution engine is distributed or not
|
ExecutionResult<T,R> |
processResult()
This method is expected to block, if there are no execution result, otherwise return the result immediately.
|
void |
submit(Task<T,R> task)
Submits the task for execution, the method is expected to return immediately.
|
String |
toString() |
public DefaultExecutionEngine(ExecutorService executorService)
executorService - public ExecutionResult<T,R> processResult()
ExecutionEngineprocessResult in interface ExecutionEngine<T extends Comparable<T>,R>public void submit(Task<T,R> task)
ExecutionEnginesubmit in interface ExecutionEngine<T extends Comparable<T>,R>public boolean isDistributed()
ExecutionEngineisDistributed in interface ExecutionEngine<T extends Comparable<T>,R>true If this execution engine is a distributed
false it it is non distributedpublic boolean isAnyTaskInError()
isAnyTaskInError in interface ExecutionEngine<T extends Comparable<T>,R>true if there are any task errors identified till that instance of time
false otherwise.Copyright © 2016 Dexecutor. All rights reserved.