T
- Type of Node/Task IDR
- Type of Node/Task resultpublic final class DefaultDependentTasksExecutor<T extends Comparable<T>,R> extends Object implements DependentTasksExecutor<T>
Constructor and Description |
---|
DefaultDependentTasksExecutor(DependentTasksExecutorConfig<T,R> config)
Creates the Executor with Config
|
DefaultDependentTasksExecutor(ExecutionEngine<T,R> executionEngine,
TaskProvider<T,R> taskProvider) |
Modifier and Type | Method and Description |
---|---|
void |
addAsDependencyToAllInitialNodes(T nodeValue)
Adds the node as dependency to all initial nodes (at the time of adding), meaning this given node would be evaluated first and then all initial nodes would run in parallel
|
void |
addAsDependentOnAllLeafNodes(T nodeValue)
Adds the node as dependent on all leaf nodes (at the time of adding), 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(ExecutionConfig config)
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
|
public DefaultDependentTasksExecutor(ExecutionEngine<T,R> executionEngine, TaskProvider<T,R> taskProvider)
public DefaultDependentTasksExecutor(DependentTasksExecutorConfig<T,R> config)
config
- public void print(Writer writer)
DependentTasksExecutor
print
in interface DependentTasksExecutor<T extends Comparable<T>>
public void addIndependent(T nodeValue)
DependentTasksExecutor
addIndependent
in interface DependentTasksExecutor<T extends Comparable<T>>
public void addDependency(T evalFirstNode, T evalLaterNode)
DependentTasksExecutor
Add 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 addAsDependentOnAllLeafNodes(T nodeValue)
DependentTasksExecutor
addAsDependentOnAllLeafNodes
in interface DependentTasksExecutor<T extends Comparable<T>>
public void addAsDependencyToAllInitialNodes(T nodeValue)
DependentTasksExecutor
addAsDependencyToAllInitialNodes
in interface DependentTasksExecutor<T extends Comparable<T>>
public void execute(ExecutionConfig config)
DependentTasksExecutor
addDepen***
apisexecute
in interface DependentTasksExecutor<T extends Comparable<T>>
Copyright © 2016 Dexecutor. All rights reserved.