Class TaskGroupEntry<TaskT extends TaskItem>
java.lang.Object
com.azure.resourcemanager.resources.fluentcore.dag.Node<DataT,NodeT>
com.azure.resourcemanager.resources.fluentcore.dag.DAGNode<TaskT,TaskGroupEntry<TaskT>>
com.azure.resourcemanager.resources.fluentcore.dag.TaskGroupEntry<TaskT>
- Type Parameters:
TaskT- the task type that can return a value
public final class TaskGroupEntry<TaskT extends TaskItem>
extends DAGNode<TaskT,TaskGroupEntry<TaskT>>
Type representing an entry in
TaskGroup that holds one TaskItem and associated
information which includes:
1. references to other TaskGroupEntry dependencies
2. references to the other TaskGroupEntry dependents-
Method Summary
Modifier and TypeMethodDescriptionbooleanvoidInitialize the node so that traversal can be performed on the parent DAG.invokeTaskAsync(boolean ignoreCachedResult, TaskGroup.InvocationContext context) Invokes the task this entry holds.protected voidonFaultedResolution(String dependencyKey, Throwable throwable) Reports a dependency of this node has been faulted.proxy()voidsetProxy(TaskGroupEntry<TaskT> proxy) Set the proxy entry for this entry.Methods inherited from class com.azure.resourcemanager.resources.fluentcore.dag.DAGNode
addDependency, addDependent, dependencyKeys, hasDependencies, isPreparer, lock, onSuccessfulResolution, removeDependency, setPreparerMethods inherited from class com.azure.resourcemanager.resources.fluentcore.dag.Node
addChild, children, data, hasChildren, key, owner, removeChild, setOwner
-
Method Details
-
initialize
public void initialize()Description copied from class:DAGNodeInitialize the node so that traversal can be performed on the parent DAG.- Overrides:
initializein classDAGNode<TaskT extends TaskItem,TaskGroupEntry<TaskT extends TaskItem>>
-
setProxy
Set the proxy entry for this entry.- Parameters:
proxy- the proxy entry
-
proxy
- Returns:
- the proxy entry if it is set, null if not set.
-
taskResult
- Returns:
- the result produced by the task.
-
hasFaultedDescentDependencyTasks
public boolean hasFaultedDescentDependencyTasks()- Returns:
- true if one or more decedent dependency tasks are in faulted state, false otherwise.
-
invokeTaskAsync
public Mono<Indexable> invokeTaskAsync(boolean ignoreCachedResult, TaskGroup.InvocationContext context) Invokes the task this entry holds. if the task cannot be invoked due to faulted dependencies then an observable that emitErroredDependencyTaskExceptionwill be returned.- Parameters:
ignoreCachedResult- if the task is already invoked and has result cached then a value false for this parameter indicates the cached result can be returned without invoking task again, if true then cached result will be ignored and task will be invokedcontext- the context object shared across all the entries in the group that this entry belongs to, this will be passed toTaskItem.invokeAsync(TaskGroup.InvocationContext)method of the task item- Returns:
- a cold Observable upon subscription invokes the task this entry hold, which produces a result of
type
Indexable.
-
onFaultedResolution
Description copied from class:DAGNodeReports a dependency of this node has been faulted.- Overrides:
onFaultedResolutionin classDAGNode<TaskT extends TaskItem,TaskGroupEntry<TaskT extends TaskItem>> - Parameters:
dependencyKey- the id of the dependency nodethrowable- the reason for unsuccessful resolution
-