T - public final class DefaultDependentTasksExecutor<T extends Comparable<T>> extends Object implements DependentTasksExecutor<T>
DependentTasksExecutor.ExecutionBehavior| Constructor and Description |
|---|
DefaultDependentTasksExecutor(DependentTasksExecutorConfig<T> config)
Creates the Executor with Config
|
DefaultDependentTasksExecutor(ExecutorService executorService,
TaskProvider<T> taskProvider)
Creates the Executor with bare minimum required params
|
| Modifier and Type | Method and Description |
|---|---|
void |
addAsDependencyToAllLeafNodes(T nodeValue)
Adds the node as dependent on all leaf nodes (currently), meaning all leaf nodes would be evaluated first and then the given node
|
void |
addDependency(T evalFirstNode,
T evalLaterNode)
Add Two dependent nodes into the graph, creating the nodes if not already present
|
void |
addIndependent(T nodeValue)
Add a node as independent, it does not require any dependent node
|
void |
execute(DependentTasksExecutor.ExecutionBehavior behavior)
Kicks off the execution of the nodes based on the dependency graph constructed, using
addDepen*** apis |
void |
print(Writer writer)
Prints the graph into the writer
|
protected boolean |
shouldRetry(T node) |
public DefaultDependentTasksExecutor(ExecutorService executorService, TaskProvider<T> taskProvider)
executorService - taskProvider - public DefaultDependentTasksExecutor(DependentTasksExecutorConfig<T> config)
config - public void print(Writer writer)
DependentTasksExecutorprint in interface DependentTasksExecutor<T extends Comparable<T>>public void addIndependent(T nodeValue)
DependentTasksExecutoraddIndependent in interface DependentTasksExecutor<T extends Comparable<T>>public void addDependency(T evalFirstNode, T evalLaterNode)
DependentTasksExecutorAdd Two dependent nodes into the graph, creating the nodes if not already present
evalFirstValue would be executed first and then evalAfterValue
addDependency in interface DependentTasksExecutor<T extends Comparable<T>>public void addAsDependencyToAllLeafNodes(T nodeValue)
DependentTasksExecutoraddAsDependencyToAllLeafNodes in interface DependentTasksExecutor<T extends Comparable<T>>public void execute(DependentTasksExecutor.ExecutionBehavior behavior)
DependentTasksExecutoraddDepen*** apisexecute in interface DependentTasksExecutor<T extends Comparable<T>>protected boolean shouldRetry(T node)
Copyright © 2016 Dexecutor. All rights reserved.