Index
All Classes and Interfaces|All Packages|Serialized Form
A
- addChild(N) - Method in interface org.jtrim2.taskgraph.basic.DirectedGraph.ChildrenBuilder
-
Adds a new child to the associated node.
- addChild(N, Consumer<? super DirectedGraph.ChildrenBuilder<N>>) - Method in interface org.jtrim2.taskgraph.basic.DirectedGraph.ChildrenBuilder
-
Adds a new child to the associated node and continues with adding children to the newly added child node.
- addChildren(Collection<? extends N>) - Method in interface org.jtrim2.taskgraph.basic.DirectedGraph.ChildrenBuilder
-
Adds new children to the associated node.
- addNode(N) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph.Builder
-
Adds a node to the graph and returns a
ChildrenBuilder
which can be used to define the children of the given node. - addNode(N, Consumer<? super DirectedGraph.ChildrenBuilder<N>>) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph.Builder
-
Adds a node to the graph and immediately allows configuring its children.
- addNode(TaskNodeKey<?, ?>) - Method in class org.jtrim2.taskgraph.basic.CollectingTaskGraphBuilder
-
Adds a node to the task execution graph.
- addNode(TaskNodeKey<?, ?>) - Method in interface org.jtrim2.taskgraph.TaskGraphBuilder
-
Adds a node to the task execution graph.
- addNodeWithChildren(N, Collection<? extends N>) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph.Builder
-
Adds a node to the graph and immediately add some children to that node.
- addResultNodeKey(TaskNodeKey<?, ?>) - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Declares that the result of the node identified by the given
TaskNodeKey
is to be delivered to theTaskGraphExecutionResult
. - addResultNodeKeys(Collection<? extends TaskNodeKey<?, ?>>) - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Declares that the result of the nodes identified by the given
TaskNodeKey
s are to be delivered to theTaskGraphExecutionResult
.
B
- bindInput(Class<I>, Class<A>, A) - Method in interface org.jtrim2.taskgraph.TaskInputBinder
-
Declares that the task node action created will need the output of the task node specified by the given key.
- bindInput(TaskFactoryKey<I, A>, A) - Method in interface org.jtrim2.taskgraph.TaskInputBinder
-
Declares that the task node action created will need the output of the task node specified by the given key.
- bindInput(TaskNodeKey<I, A>) - Method in interface org.jtrim2.taskgraph.TaskInputBinder
-
Declares that the task node action created will need the output of the task node specified by the given key.
- build() - Method in class org.jtrim2.taskgraph.basic.CollectingTaskGraphDefConfigurer
-
Creates a
TaskGraphBuilder
through which you will be able to create the initial task nodes of the execution graph. - build() - Method in class org.jtrim2.taskgraph.basic.DirectedGraph.Builder
-
Creates a snapshot of the currently built graph.
- build() - Method in class org.jtrim2.taskgraph.TaskFactoryProperties.Builder
-
Creates a snapshot of the current state of this
Builder
. - build() - Method in class org.jtrim2.taskgraph.TaskGraphBuilderProperties.Builder
-
Creates a snapshot of the current state of this
Builder
. - build() - Method in interface org.jtrim2.taskgraph.TaskGraphDefConfigurer
-
Creates a
TaskGraphBuilder
through which you will be able to create the initial task nodes of the execution graph. - build() - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Creates a snapshot of the current state of this
Builder
. - build() - Method in class org.jtrim2.taskgraph.TaskNodeProperties.Builder
-
Creates a snapshot of the current state of this
Builder
. - Builder() - Constructor for class org.jtrim2.taskgraph.basic.DirectedGraph.Builder
-
Creates a new
Builder
with no nodes added yet. - Builder() - Constructor for class org.jtrim2.taskgraph.TaskFactoryProperties.Builder
-
Initializes the
Builder
with the default values: factoryExecutor: An executor synchronously executing tasks on the calling thread. - Builder() - Constructor for class org.jtrim2.taskgraph.TaskGraphBuilderProperties.Builder
-
Initializes the
Builder
with the default values: nodeCreateErrorHandler: A callback logging the error on SEVERE level. - Builder() - Constructor for class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Initializes the
Builder
with the default values: stopOnFailure:false
deliverResultOnFailure:false
computeErrorHandler: A callback logging the error on SEVERE level. resultNodeKeys: an empty set - Builder() - Constructor for class org.jtrim2.taskgraph.TaskNodeProperties.Builder
-
Initializes the
Builder
with the default values: executor: An executor synchronously executing tasks on the calling thread. - Builder(TaskFactoryProperties) - Constructor for class org.jtrim2.taskgraph.TaskFactoryProperties.Builder
-
Initializes the
Builder
with the values of the givenTaskFactoryProperties
. - Builder(TaskGraphBuilderProperties) - Constructor for class org.jtrim2.taskgraph.TaskGraphBuilderProperties.Builder
-
Initializes the
Builder
with the values of the givenTaskGraphBuilderProperties
. - Builder(TaskGraphExecutorProperties) - Constructor for class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Initializes the
Builder
with the values of the givenTaskGraphExecutorProperties
. - Builder(TaskNodeProperties) - Constructor for class org.jtrim2.taskgraph.TaskNodeProperties.Builder
-
Initializes the
Builder
with the values of the givenTaskNodeProperties
. - buildGraph(CancellationToken) - Method in class org.jtrim2.taskgraph.basic.CollectingTaskGraphBuilder
-
Starts building a task graph and will notify the returned
CompletionStage
once the graph is built and is ready to be executed. - buildGraph(CancellationToken) - Method in interface org.jtrim2.taskgraph.TaskGraphBuilder
-
Starts building a task graph and will notify the returned
CompletionStage
once the graph is built and is ready to be executed. - buildStrategy(DependencyDag<TaskNodeKey<?, ?>>, Iterable<? extends RestrictableNode>) - Method in interface org.jtrim2.taskgraph.basic.TaskExecutionRestrictionStrategyFactory
-
Creates a strategy for the given task execution graph.
- BuiltGraph - Class in org.jtrim2.taskgraph
-
Defines a whole task execution graph.
- BuiltGraph(Set<TaskNodeKey<?, ?>>, DependencyDag<TaskNodeKey<?, ?>>) - Constructor for class org.jtrim2.taskgraph.BuiltGraph
-
Creates a new task execution graph with the given edges and nodes.
C
- cancel() - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Cancels the computation of this node if it was not computed yet.
- CANCELED - Enum constant in enum class org.jtrim2.taskgraph.ExecutionResultType
-
CANCELED
means that the task graph execution was canceled before it could have been fully computed and no other unexpected exceptions were thrown. - checkNotCyclic() - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Checks if this graph is acyclic or not, throwing an exception if this graph is not acyclic.
- CollectingTaskGraphBuilder - Class in org.jtrim2.taskgraph.basic
-
Defines a simple implementation of
TaskGraphBuilder
which collects the added task node keys and simply passes them to a givenTaskGraphExecutorFactory
. - CollectingTaskGraphBuilder(Collection<? extends TaskFactoryConfig<?, ?>>, TaskGraphExecutorFactory) - Constructor for class org.jtrim2.taskgraph.basic.CollectingTaskGraphBuilder
-
Creates a new
CollectingTaskGraphBuilder
with the given task factory definitions andTaskGraphExecutorFactory
. - CollectingTaskGraphDefConfigurer - Class in org.jtrim2.taskgraph.basic
-
Defines a simple implementation of
TaskGraphDefConfigurer
which collects the added task factory definitions and simply passes them to a givenTaskGraphBuilderFactory
. - CollectingTaskGraphDefConfigurer(TaskGraphBuilderFactory) - Constructor for class org.jtrim2.taskgraph.basic.CollectingTaskGraphDefConfigurer
-
Creates a new
CollectingTaskGraphDefConfigurer
with the givenTaskGraphBuilderFactory
to be called when thebuild()
method is called. - compute(CancellationToken) - Method in class org.jtrim2.taskgraph.basic.NodeTaskRef
-
Executes the task action and returns its output.
- consumeInput() - Method in interface org.jtrim2.taskgraph.TaskInputRef
-
Returns the input bound when creating the task node.
- createExecutor(DependencyDag<TaskNodeKey<?, ?>>, Iterable<? extends TaskNode<?, ?>>) - Method in interface org.jtrim2.taskgraph.basic.TaskGraphExecutorFactory
-
Returns a new
TaskGraphExecutor
able to execute the given task graph. - createGraphBuilder(Collection<? extends TaskFactoryConfig<?, ?>>) - Method in interface org.jtrim2.taskgraph.basic.TaskGraphBuilderFactory
-
Returns a new
TaskGraphBuilder
able to build a graph using the given task node factories. - createTaskNode(CancellationToken, TaskNodeCreateArgs<R, I>) - Method in interface org.jtrim2.taskgraph.TaskFactory
-
Creates the task node function, binds input for that function and may set properties of the task node to be created.
- createTaskNode(CancellationToken, TaskNodeCreateArgs<R, I>, TaskFactory<R, I>) - Method in interface org.jtrim2.taskgraph.TaskNodeWrapper
-
Creates the task node function relying on the given wrapped task node.
- createTaskNode(TaskFactoryProperties, TaskFactoryKey<R, I>, TaskFactorySetup<R, I>) - Method in interface org.jtrim2.taskgraph.TaskFactoryWrapper
-
Creates the task node factory relying on the given wrapped task node factory.
D
- defaultFactoryProperties() - Method in class org.jtrim2.taskgraph.TaskGraphBuilderProperties.Builder
-
Returns the default values of the properties used by the task node factories.
- defaultNodeProperties() - Method in class org.jtrim2.taskgraph.TaskFactoryProperties.Builder
-
Returns the default values of the properties used by the task nodes.
- defineFactory(TaskFactoryKey<R, I>, TaskFactorySetup<R, I>) - Method in interface org.jtrim2.taskgraph.TaskFactoryDefiner
-
Adds deferred task node factory definition.
- defineSimpleFactory(Class<R>, Class<I>, TaskFactory<R, I>) - Method in interface org.jtrim2.taskgraph.TaskFactoryDefiner
-
Adds a task node factory.
- defineSimpleFactory(TaskFactoryKey<R, I>, TaskFactory<R, I>) - Method in interface org.jtrim2.taskgraph.TaskFactoryDefiner
-
Adds a task node factory.
- delegateTo(Function<TaskNodeKey<R, I>, TaskNodeKey<R, I2>>) - Static method in class org.jtrim2.taskgraph.TaskFactories
-
Creates a task factory delegating its call to another already declared task factory.
- delegateToCustomKey(Function<? super I, ?>) - Static method in class org.jtrim2.taskgraph.TaskFactories
-
Creates a task factory which delegates its call to another already declared task factory with a selected
custom key
. - delegateToFactoryArg(Class<I2>, Function<? super I, ? extends I2>) - Static method in class org.jtrim2.taskgraph.TaskFactories
-
Creates a task factory delegating its call to another already declared task factory with a different
factory argument type
. - DependencyDag<N> - Class in org.jtrim2.taskgraph.basic
-
Defines a directed acyclic graph (DAG).
- DependencyDag(DirectedGraph<N>) - Constructor for class org.jtrim2.taskgraph.basic.DependencyDag
-
Creates a
DependencyDag
from a directed graph where the edges point from dependent node to their dependencies. - DependencyErrorHandler - Interface in org.jtrim2.taskgraph
-
Defines an error handler to be called instead of the associated node computation when the node is not being executed due to a failed dependency.
- DirectedGraph<N> - Class in org.jtrim2.taskgraph.basic
-
Defines a directed graph without any solitary nodes.
- DirectedGraph.Builder<N> - Class in org.jtrim2.taskgraph.basic
-
The
Builder
used to createDirectedGraph
instances. - DirectedGraph.ChildrenBuilder<N> - Interface in org.jtrim2.taskgraph.basic
-
Defines a builder to add children to a particular node in the graph.
E
- eagerStrategy() - Static method in class org.jtrim2.taskgraph.basic.TaskExecutionRestrictionStrategies
-
Returns a strategy which will allow executing tasks as soon as possible.
- ensureScheduleComputed(CancellationToken) - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Schedules this task node for computation if it was not scheduled yet.
- ensureScheduleComputed(CancellationToken, TaskErrorHandler) - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Schedules this task node for computation if it was not scheduled yet.
- equals(Object) - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns
true
if the passed object is aTaskFactoryKey
and identifies the same task node factory as thisTaskFactoryKey
. - equals(Object) - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns
true
if the passed object is aTaskNodeKey
and identifies the same task node as thisTaskNodeKey
. - ERRORED - Enum constant in enum class org.jtrim2.taskgraph.ExecutionResultType
-
ERRORED
means that the task graph execution failed due to an exception being thrown while trying to compute the output of a task node. - execute(CancellationToken) - Method in class org.jtrim2.taskgraph.basic.RestrictableTaskGraphExecutor
-
Starts executing the associated task graph and will notify the returned
CompletionStage
once task execution terminates. - execute(CancellationToken) - Method in interface org.jtrim2.taskgraph.TaskGraphExecutor
-
Starts executing the associated task graph and will notify the returned
CompletionStage
once task execution terminates. - ExecutionResultType - Enum Class in org.jtrim2.taskgraph
-
Defines the possible general outcomes of a task graph execution.
F
- factoryArg() - Method in class org.jtrim2.taskgraph.TaskNodeCreateArgs
-
Returns the argument passed to the task node factory.
- factoryGroupDefiner(TaskFactoryGroupConfigurer) - Method in class org.jtrim2.taskgraph.basic.CollectingTaskGraphDefConfigurer
-
Returns a
TaskFactoryDefiner
through which it is possible to define task node factories. - factoryGroupDefiner(TaskFactoryGroupConfigurer) - Method in interface org.jtrim2.taskgraph.TaskGraphDefConfigurer
-
Returns a
TaskFactoryDefiner
through which it is possible to define task node factories. - futureOf(TaskNodeKey<R, ?>) - Method in class org.jtrim2.taskgraph.basic.RestrictableTaskGraphExecutor
-
Returns the
CompletionStage
tracking the completion of the given task node. - futureOf(TaskNodeKey<R, ?>) - Method in interface org.jtrim2.taskgraph.TaskGraphExecutor
-
Returns the
CompletionStage
tracking the completion of the given task node.
G
- getAllLeafToRootNodes(Iterable<? extends N>) - Method in class org.jtrim2.taskgraph.basic.DependencyDag
-
Returns a map, mapping the leaf nodes (nodes having no children) to nodes they are reachable where the image of the mapping only contains nodes specified in the argument.
- getAllLeafToRootNodes(Iterable<? extends N>) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns a map, mapping the leaf nodes (nodes having no children) to nodes they are reachable where the image of the mapping only contains nodes specified in the argument.
- getAllLeafToRootNodes(Iterable<? extends N>, Supplier<? extends Set<N>>) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns a map, mapping the leaf nodes (nodes having no children) to nodes they are reachable where the image of the mapping only contains nodes specified in the argument.
- getAllLeafToRootNodesOrdered(Iterable<? extends N>) - Method in class org.jtrim2.taskgraph.basic.DependencyDag
-
Returns a map, mapping the leaf nodes (nodes having no children) to nodes they are reachable where the image of the mapping only contains nodes specified in the argument.
- getBuiltGraph() - Method in class org.jtrim2.taskgraph.basic.RestrictableTaskGraphExecutor
-
Returns the whole task graph to be executed.
- getBuiltGraph() - Method in interface org.jtrim2.taskgraph.TaskGraphExecutor
-
Returns the whole task graph to be executed.
- getChildren(N) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns the set of direct children of the given node.
- getComputeErrorHandler() - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties
-
Returns the callback notified whenever a failure occurs while trying to execute the action of task node.
- getConfigurer() - Method in class org.jtrim2.taskgraph.TaskFactoryConfig
-
Returns the method of defining the configuration of the associated task factory.
- getDefaultFactoryProperties() - Method in class org.jtrim2.taskgraph.TaskGraphBuilderProperties
-
Returns the default values of the properties used by the task node factories.
- getDefaultNodeProperties() - Method in class org.jtrim2.taskgraph.TaskFactoryProperties
-
Returns the default values of the properties used by the task nodes.
- getDefKey() - Method in class org.jtrim2.taskgraph.TaskFactoryConfig
-
Returns the key uniquely identifying the associated task node factory.
- getDependencyGraph() - Method in class org.jtrim2.taskgraph.basic.DependencyDag
-
Returns the directed graph where the edges point from dependent node to their dependencies.
- getExecutor() - Method in class org.jtrim2.taskgraph.TaskNodeProperties
-
Returns the executor used to execute action of the associated task node.
- getExpectedResultNow(TaskNodeKey<?, ?>, CompletableFuture<? extends R>) - Static method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns the output from the given
CompletableFuture
translatingCancellationException
toOperationCanceledException
. - getFactoryArg() - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns the argument passed to the task factory creating the node.
- getFactoryArgType() - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns the type of the argument passed to the task node factory when requested for a node to be created.
- getFactoryExecutor() - Method in class org.jtrim2.taskgraph.TaskFactoryProperties
-
Returns the executor used execute the
createTaskNode
method of the associated task factory. - getFactoryKey() - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns the key identifying the task factory creating the node.
- getForwardGraph() - Method in class org.jtrim2.taskgraph.basic.DependencyDag
-
Returns the directed graph where the edges point from the dependency to dependent node.
- getGraph() - Method in class org.jtrim2.taskgraph.BuiltGraph
-
Returns the edges of the task execution graph.
- getKey() - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns the
TaskNodeKey
uniquely identifying this task in the task graph. - getKey() - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns the custom key differentiating between
TaskFactoryKey
instances when types are not enough. - getNodeCreateErrorHandler() - Method in class org.jtrim2.taskgraph.TaskGraphBuilderProperties
-
Returns the callback notified whenever a failure occurs while trying to create a node with the associated task factory.
- getNodeKey() - Method in class org.jtrim2.taskgraph.basic.RestrictableNode
-
Returns the
TaskNodeKey
identifying the node which is to be restricted. - getNodes() - Method in class org.jtrim2.taskgraph.BuiltGraph
-
Returns the nodes of the task execution graph.
- getProperties() - Method in class org.jtrim2.taskgraph.basic.NodeTaskRef
-
Returns the properties associated with the task node.
- getRawGraph() - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns a map, mapping parent nodes to their direct children.
- getReachableNodes(Iterable<? extends N>) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns all the nodes reachable from any of the nodes given in the argument.
- getReleaseAction() - Method in class org.jtrim2.taskgraph.basic.RestrictableNode
-
Returns the action to be called once the
TaskExecutionRestrictionStrategy
decides that the task can be scheduled for execution. - getResult() - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns the output of this node or throws an exception if it was completed exceptionally.
- getResult(TaskNodeKey<R, ?>) - Method in interface org.jtrim2.taskgraph.TaskGraphExecutionResult
-
Returns the output of the task node identified by the given
TaskNodeKey
. - getResultNodeKeys() - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties
-
Returns the set of
TaskNodeKey
identifying the nodes whose result are to be delivered to theTaskGraphExecutionResult
. - getResultNow(CompletableFuture<? extends R>) - Static method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns the output from the given
CompletableFuture
translatingCancellationException
toOperationCanceledException
. - getResultType() - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns the return type of the task nodes created by the defined task node factory.
- getResultType() - Method in interface org.jtrim2.taskgraph.TaskGraphExecutionResult
-
Returns if the task graph execution completed completely successfully or not.
- getSetup() - Method in class org.jtrim2.taskgraph.TaskFactoryConfig
-
Returns the deferred task node factory creator.
H
- handleDependencyError(CancellationToken, TaskNodeKey<?, ?>, Throwable) - Method in interface org.jtrim2.taskgraph.DependencyErrorHandler
-
Called when the associated node cannot be executed due to a dependency failure.
- hasChildren(N) - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns
true
if the given node has at least one child node,false
otherwise. - hashCode() - Method in class org.jtrim2.taskgraph.TaskFactoryKey
- hashCode() - Method in class org.jtrim2.taskgraph.TaskNodeKey
- hasResult() - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns
true
if this task node has already completed successfully and has its result set.
I
- inputs() - Method in class org.jtrim2.taskgraph.TaskNodeCreateArgs
-
Returns the
TaskInputBinder
used to bind inputs for the created task node function. - isDeliverResultOnFailure() - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties
-
Returns
true
if results of the computation should be delivered even in case of failure. - isStopOnFailure() - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties
-
Returns
true
if execution should be canceled after encountering the first failure.
N
- newEagerExecutor() - Static method in class org.jtrim2.taskgraph.TaskGraphExecutors
-
Creates a task graph executor which will schedule all nodes to be computed as soon as possible.
- newRestrictableExecutor(TaskExecutionRestrictionStrategyFactory) - Static method in class org.jtrim2.taskgraph.TaskGraphExecutors
-
Creates a task graph executor which will limit the scheduled nodes with the given custom strategy.
- newWeakLeafRestricterExecutor(int) - Static method in class org.jtrim2.taskgraph.TaskGraphExecutors
-
Creates a task graph executor which will limit the number of scheduled nodes based on how many leaf nodes are still retained.
- nodeKey() - Method in class org.jtrim2.taskgraph.TaskNodeCreateArgs
-
Returns the key uniquely identifying the task node to be created.
- NodeTaskRef<R> - Class in org.jtrim2.taskgraph.basic
-
Defines the fully built task of a node.
- NodeTaskRef(TaskNodeProperties, CancelableFunction<? extends R>) - Constructor for class org.jtrim2.taskgraph.basic.NodeTaskRef
-
Creates a
NodeTaskRef
with the given properties and task action.
O
- onError(TaskNodeKey<?, ?>, Throwable) - Method in interface org.jtrim2.taskgraph.TaskErrorHandler
-
Called whenever a failure occurs while trying to create or execute a task node.
- org.jtrim2.taskgraph - package org.jtrim2.taskgraph
-
Defines the core interface for the task graph execution framework.
- org.jtrim2.taskgraph.basic - package org.jtrim2.taskgraph.basic
-
Defines basic implementations of the task graph execution framework.
P
- propagateDependencyFailure(CancellationToken, Throwable) - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Completes this task node exceptionally but calling the
dependency error handler
first (if there is any). - propagateFailure(Throwable) - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Completes this task node exceptionally with the given error if it was not completed yet.
- properties() - Method in class org.jtrim2.taskgraph.basic.CollectingTaskGraphBuilder
-
Returns the properties used when building the task graph.
- properties() - Method in class org.jtrim2.taskgraph.basic.RestrictableTaskGraphExecutor
-
Returns the properties used for executing the task graph.
- properties() - Method in interface org.jtrim2.taskgraph.TaskGraphBuilder
-
Returns the properties used when building the task graph.
- properties() - Method in interface org.jtrim2.taskgraph.TaskGraphExecutor
-
Returns the properties used for executing the task graph.
- properties() - Method in class org.jtrim2.taskgraph.TaskNodeCreateArgs
-
Returns the properties to be set for the associated task node to be created.
R
- release() - Method in class org.jtrim2.taskgraph.basic.RestrictableNode
-
Allows the associated task node to be scheduled for execution.
- RestrictableNode - Class in org.jtrim2.taskgraph.basic
-
Defines a node which a
TaskExecutionRestrictionStrategy
can restrict from being executed. - RestrictableNode(TaskNodeKey<?, ?>, Runnable) - Constructor for class org.jtrim2.taskgraph.basic.RestrictableNode
-
Creates a new
RestrictableNode
with the given key and action used to release this node. - RestrictableTaskGraphExecutor - Class in org.jtrim2.taskgraph.basic
-
Defines an implementation of
TaskGraphExecutor
allowing to restrict task node execution using an externally provided customstrategy
. - RestrictableTaskGraphExecutor(DependencyDag<TaskNodeKey<?, ?>>, Iterable<? extends TaskNode<?, ?>>, TaskExecutionRestrictionStrategyFactory) - Constructor for class org.jtrim2.taskgraph.basic.RestrictableTaskGraphExecutor
-
Creates a new
RestrictableTaskGraphExecutor
with the given task graph, nodes and task execution restriction strategy. - reverse() - Method in class org.jtrim2.taskgraph.basic.DependencyDag
-
Returns a
DependencyDag
having edges in the opposite direction than thisDependencyDag
. - reverseGraph() - Method in class org.jtrim2.taskgraph.basic.DirectedGraph
-
Returns a
DirectedGraph
where the edges a reversed compared to this graph.
S
- setComputeErrorHandler(TaskErrorHandler) - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Sets the callback notified whenever a failure occurs while trying to execute the action of a node.
- setDeliverResultOnFailure(boolean) - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Sets the flag determining if the result of the computation should be delivered to the
TaskGraphExecutionResult
or not. - setDependencyErrorHandler(DependencyErrorHandler) - Method in class org.jtrim2.taskgraph.TaskNodeProperties.Builder
-
Sets an error handler to be called if the associated node could not be executed due to a dependency error.
- setExecutor(TaskExecutor) - Method in class org.jtrim2.taskgraph.TaskNodeProperties.Builder
-
Sets the executor used to execute the actions of the task nodes.
- setFactoryExecutor(TaskExecutor) - Method in class org.jtrim2.taskgraph.TaskFactoryProperties.Builder
-
Sets the executor used execute the
createTaskNode
method of the associated task factory. - setNodeComputed(TaskNodeKey<?, ?>) - Method in interface org.jtrim2.taskgraph.basic.TaskExecutionRestrictionStrategy
-
The task graph executor calls this method for every computed task node or task nodes decided to be not computed (possibly because one of its dependencies failed).
- setNodeCreateErrorHandler(TaskErrorHandler) - Method in class org.jtrim2.taskgraph.TaskGraphBuilderProperties.Builder
-
Sets the callback notified whenever a failure occurs while trying to create a node with the associated task factory.
- setStopOnFailure(boolean) - Method in class org.jtrim2.taskgraph.TaskGraphExecutorProperties.Builder
-
Sets the flag determining if execution should be canceled after encountering the first failure, or not.
- setup(TaskFactoryProperties) - Method in interface org.jtrim2.taskgraph.TaskFactorySetup
-
Creates a task node factory given the properties of the factory.
- setup(TaskFactoryProperties.Builder) - Method in interface org.jtrim2.taskgraph.TaskFactoryGroupConfigurer
-
Configures the associated task node factory.
- SUCCESS - Enum constant in enum class org.jtrim2.taskgraph.ExecutionResultType
-
SUCCESS
means that the task graph execution completed fully without any exception being raised and without being canceled.
T
- TaskErrorHandler - Interface in org.jtrim2.taskgraph
-
Defines a callback notified whenever a failure occurs while trying to create or execute a task node.
- TaskExecutionRestrictionStrategies - Class in org.jtrim2.taskgraph.basic
-
Defines factory methods for
TaskExecutionRestrictionStrategyFactory
implementations. - TaskExecutionRestrictionStrategy - Interface in org.jtrim2.taskgraph.basic
-
Defines a strategy which can restrict nodes from being executed in order to prevent too much concurrent resource usage.
- TaskExecutionRestrictionStrategyFactory - Interface in org.jtrim2.taskgraph.basic
-
Defines a factory of
TaskExecutionRestrictionStrategy
creating task execution restriction strategy for a particular task graph. - TaskExecutorAop - Class in org.jtrim2.taskgraph
-
Contains utility methods to do task before or after a task node.
- TaskFactories - Class in org.jtrim2.taskgraph
-
Defines utility methods to implement task node factories.
- TaskFactory<R,
I> - Interface in org.jtrim2.taskgraph -
Defines a factory for creating task node function for the task execution graph.
- TaskFactoryConfig<R,
I> - Class in org.jtrim2.taskgraph -
Defines a complete definition of a task node factory.
- TaskFactoryConfig(TaskFactoryKey<R, I>, TaskFactoryGroupConfigurer, TaskFactorySetup<R, I>) - Constructor for class org.jtrim2.taskgraph.TaskFactoryConfig
-
Creates a task node factory definition with the given properties.
- TaskFactoryDefiner - Interface in org.jtrim2.taskgraph
-
Allows to define task node factories to build a task graph from.
- TaskFactoryGroupConfigurer - Interface in org.jtrim2.taskgraph
-
Defines the configuration of a task node factory.
- TaskFactoryKey<R,
I> - Class in org.jtrim2.taskgraph -
Defines the key uniquely identifying a particular task node factory.
- TaskFactoryKey(Class<R>, Class<I>) - Constructor for class org.jtrim2.taskgraph.TaskFactoryKey
- TaskFactoryKey(Class<R>, Class<I>, Object) - Constructor for class org.jtrim2.taskgraph.TaskFactoryKey
-
Creates a new
TaskFactoryKey
with the given properties. - TaskFactoryProperties - Class in org.jtrim2.taskgraph
-
Defines the properties of a task node factory.
- TaskFactoryProperties(TaskFactoryProperties.Builder) - Constructor for class org.jtrim2.taskgraph.TaskFactoryProperties
-
Sets the properties of the
TaskFactoryProperties
from the current value of the passedBuilder
. - TaskFactoryProperties.Builder - Class in org.jtrim2.taskgraph
-
The
Builder
used to createTaskFactoryProperties
instances. - TaskFactorySetup<R,
I> - Interface in org.jtrim2.taskgraph -
Defines a deferred creator of a task node factory.
- TaskFactoryWrapper - Interface in org.jtrim2.taskgraph
-
Defines a task node factory wrapping another task node factory.
- taskFuture() - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns the
CompletableFuture
holding the result of the output of this task node. - TaskGraphBuilder - Interface in org.jtrim2.taskgraph
-
Defines the initial nodes of the task graph.
- TaskGraphBuilderFactory - Interface in org.jtrim2.taskgraph.basic
-
Defines factory creating
TaskGraphBuilder
for a list of task node factory definitions. - TaskGraphBuilderProperties - Class in org.jtrim2.taskgraph
-
Defines the properties used to control task graph building (not its execution).
- TaskGraphBuilderProperties(TaskGraphBuilderProperties.Builder) - Constructor for class org.jtrim2.taskgraph.TaskGraphBuilderProperties
-
Sets the properties of the
TaskGraphBuilderProperties
from the current value of the passedBuilder
. - TaskGraphBuilderProperties.Builder - Class in org.jtrim2.taskgraph
-
The
Builder
used to createTaskGraphBuilderProperties
instances. - TaskGraphDefConfigurer - Interface in org.jtrim2.taskgraph
-
Defines how to create task nodes, which is the first step in building a task execution graph.
- TaskGraphExecutionException - Exception in org.jtrim2.taskgraph
-
Defines an exception meaning that a task graph execution failed due to a node's action throwing an exception.
- TaskGraphExecutionException() - Constructor for exception org.jtrim2.taskgraph.TaskGraphExecutionException
-
Creates the exception with
null
as itsdetail message
. - TaskGraphExecutionException(String) - Constructor for exception org.jtrim2.taskgraph.TaskGraphExecutionException
-
Creates the exception with a specific
detail message
. - TaskGraphExecutionException(String, Throwable) - Constructor for exception org.jtrim2.taskgraph.TaskGraphExecutionException
-
Creates the exception with a specific
detail message
andcause
. - TaskGraphExecutionException(String, Throwable, boolean) - Constructor for exception org.jtrim2.taskgraph.TaskGraphExecutionException
-
Constructs a new runtime exception with the specified detail message, cause, and writable stack trace enabled or disabled.
- TaskGraphExecutionException(Throwable) - Constructor for exception org.jtrim2.taskgraph.TaskGraphExecutionException
-
Constructs a new runtime exception with the specified cause and a detail message of
(cause==null ? null : cause.toString())
(which typically contains the class and detail message ofcause
). - TaskGraphExecutionResult - Interface in org.jtrim2.taskgraph
-
Defines the result of a task graph execution.
- TaskGraphExecutor - Interface in org.jtrim2.taskgraph
-
Defines a executor which executes an already built task execution graph.
- TaskGraphExecutorFactory - Interface in org.jtrim2.taskgraph.basic
-
Defines factory creating
TaskGraphExecutor
for a given task graph. - TaskGraphExecutorProperties - Class in org.jtrim2.taskgraph
-
Defines the properties used to control task graph execution.
- TaskGraphExecutorProperties(TaskGraphExecutorProperties.Builder) - Constructor for class org.jtrim2.taskgraph.TaskGraphExecutorProperties
-
Sets the properties of the
TaskGraphExecutorProperties
from the current value of the passedBuilder
. - TaskGraphExecutorProperties.Builder - Class in org.jtrim2.taskgraph
-
The
Builder
used to createTaskGraphExecutorProperties
instances. - TaskGraphExecutors - Class in org.jtrim2.taskgraph
-
Defines factory methods to create a task graph executors.
- TaskInputBinder - Interface in org.jtrim2.taskgraph
-
A
TaskInputBinder
is used by task node factories to define the inputs of the task node they create. - TaskInputRef<I> - Interface in org.jtrim2.taskgraph
-
Defines a reference to the input of a task node.
- TaskNode<R,
I> - Class in org.jtrim2.taskgraph.basic -
Defines a task node which can be computed once.
- TaskNode(TaskNodeKey<R, I>, NodeTaskRef<R>) - Constructor for class org.jtrim2.taskgraph.basic.TaskNode
-
Creates a new
TaskNode
with the given node key and task. - TaskNode(TaskNodeKey<R, I>, NodeTaskRef<R>, CompletableFuture<R>) - Constructor for class org.jtrim2.taskgraph.basic.TaskNode
-
Creates a new
TaskNode
with the given node key and task. - TaskNodeCreateArgs<R,
I> - Class in org.jtrim2.taskgraph -
Defines the properties used to create a task node.
- TaskNodeCreateArgs(TaskNodeKey<R, I>, TaskNodeProperties, TaskInputBinder) - Constructor for class org.jtrim2.taskgraph.TaskNodeCreateArgs
-
Creates a new
TaskNodeCreateArgs
with the given properties. - TaskNodeKey<R,
I> - Class in org.jtrim2.taskgraph -
Defines the key uniquely identifying a particular task node.
- TaskNodeKey(TaskFactoryKey<R, I>, I) - Constructor for class org.jtrim2.taskgraph.TaskNodeKey
-
Creates a new
TaskNodeKey
with the given factory key and argument. - TaskNodeProperties - Class in org.jtrim2.taskgraph
-
Defines the properties of a task node.
- TaskNodeProperties(TaskNodeProperties.Builder) - Constructor for class org.jtrim2.taskgraph.TaskNodeProperties
-
Sets the properties of the
TaskNodeProperties
from the current value of the passedBuilder
. - TaskNodeProperties.Builder - Class in org.jtrim2.taskgraph
-
The
Builder
used to createTaskNodeProperties
instances. - TaskNodeWrapper - Interface in org.jtrim2.taskgraph
-
Defines a task node wrapping another task node.
- TaskSkippedException - Exception in org.jtrim2.taskgraph
-
Defines an exception to be thrown when a task execution is skipped but failing to compute a task is not considered an error for the whole computation.
- TaskSkippedException() - Constructor for exception org.jtrim2.taskgraph.TaskSkippedException
-
Creates the exception with
null
as itsdetail message
. - TaskSkippedException(String) - Constructor for exception org.jtrim2.taskgraph.TaskSkippedException
-
Creates the exception with a specific
detail message
. - TaskSkippedException(String, Throwable) - Constructor for exception org.jtrim2.taskgraph.TaskSkippedException
-
Creates the exception with a specific
detail message
andcause
. - TaskSkippedException(Throwable) - Constructor for exception org.jtrim2.taskgraph.TaskSkippedException
-
Creates the exception with a specific
cause
. - toString() - Method in class org.jtrim2.taskgraph.basic.RestrictableNode
-
Returns the string representation of this
RestrictableNode
in no particular format. - toString() - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns the string representation of this
TaskFactoryKey
in no particular format. - toString() - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns the string representation of this
TaskNodeKey
in no particular format. - transformResult(Class<R2>, Function<? super R2, ? extends R>) - Static method in class org.jtrim2.taskgraph.TaskFactories
-
Creates a task factory creating nodes depending on a node with the same key except with the result type changed.
- tryGetDependencyErrorHandler() - Method in class org.jtrim2.taskgraph.TaskNodeProperties
-
Returns the handler to be called when the associated task node cannot due to a failure in one of its dependencies.
V
- valueOf(String) - Static method in enum class org.jtrim2.taskgraph.ExecutionResultType
-
Returns the enum constant of this class with the specified name.
- values() - Static method in enum class org.jtrim2.taskgraph.ExecutionResultType
-
Returns an array containing the constants of this enum class, in the order they are declared.
W
- wasScheduled() - Method in class org.jtrim2.taskgraph.basic.TaskNode
-
Returns
true
if this task properly scheduled. - weakLeafsOfEndNodeRestrictingStrategy(int) - Static method in class org.jtrim2.taskgraph.basic.TaskExecutionRestrictionStrategies
-
Returns a strategy which will limit the number of scheduled nodes based on how many leaf nodes are still retained.
- withFactoryArg(I) - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns a
TaskNodeKey
with the same properties as thisTaskNodeKey
but with itsfactory argument
replaced. - withFactoryArgType(Class<I2>) - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns a
TaskFactoryKey
with the same properties as thisTaskFactoryKey
but with itsfactory argument type
replaced. - withFactoryCustomKey(Object) - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns a
TaskNodeKey
with the same properties as thisTaskNodeKey
but with itscustom factory key
replaced. - withFactoryKey(TaskFactoryKey<R2, I>) - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns a
TaskNodeKey
with the same properties as thisTaskNodeKey
but with itsfactory key
replaced. - withKey(Object) - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns a
TaskFactoryKey
with the same properties as thisTaskFactoryKey
but with itscustom key
replaced. - withoutStackTrace(String, Throwable) - Static method in exception org.jtrim2.taskgraph.TaskGraphExecutionException
-
Returns a new instance of
TaskGraphExecutionException
without stack trace information. - withResultType(Class<R2>) - Method in class org.jtrim2.taskgraph.TaskFactoryKey
-
Returns a
TaskFactoryKey
with the same properties as thisTaskFactoryKey
but with itsresult type
replaced. - withResultType(Class<R2>) - Method in class org.jtrim2.taskgraph.TaskNodeKey
-
Returns a
TaskNodeKey
with the same properties as thisTaskNodeKey
but with itsresult type
replaced. - wrapFactory(TaskFactoryDefiner, TaskFactoryWrapper) - Static method in class org.jtrim2.taskgraph.TaskExecutorAop
-
Returns a
TaskFactoryDefiner
delegating all calls to the givenTaskFactoryDefiner
but wrapping its task node factories using the givenTaskFactoryWrapper
. - wrapNode(TaskFactoryDefiner, TaskNodeWrapper) - Static method in class org.jtrim2.taskgraph.TaskExecutorAop
-
Returns a
TaskFactoryDefiner
delegating all calls to the givenTaskFactoryDefiner
but wrapping its task nodes using the givenTaskNodeWrapper
.
All Classes and Interfaces|All Packages|Serialized Form