T
- public interface DependentTasksExecutor<T extends Comparable<T>>
Modifier and Type | Interface and Description |
---|---|
static class |
DependentTasksExecutor.ExecutionBehavior
Defines the execution behavior of the tasks
TERMINATING : Whole tasks execution would come to an end after the execution is thrown
NON_TERMINATING : Tasks execution wont come to halt after an exception is thrown out of task
RETRY_ONCE_TERMINATING : A retry would be attempted after an exception is thrown, and then if the execption is thrown again, the tasks execution would stop
|
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 evalFirstValue,
T evalAfterValue)
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
|
void addIndependent(T nodeValue)
nodeValue
- void addDependency(T evalFirstValue, T evalAfterValue)
Add Two dependent nodes into the graph, creating the nodes if not already present
evalFirstValue
would be executed first and then evalAfterValue
evalFirstValue
- evalAfterValue
- void addAsDependentOnAllLeafNodes(T nodeValue)
nodeValue
- void addAsDependencyToAllInitialNodes(T nodeValue)
nodeValue
- void execute(DependentTasksExecutor.ExecutionBehavior behavior)
addDepen***
apisbehavior
- void print(Writer writer)
writer
- Copyright © 2016 Dexecutor. All rights reserved.