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 inTaskGroupthat holds oneTaskItemand associated information which includes: 1. references to otherTaskGroupEntrydependencies 2. references to the otherTaskGroupEntrydependents
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasFaultedDescentDependencyTasks()voidinitialize()Initialize the node so that traversal can be performed on the parent DAG.Mono<Indexable>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.TaskGroupEntry<TaskT>proxy()voidsetProxy(TaskGroupEntry<TaskT> proxy)Set the proxy entry for this entry.IndexabletaskResult()-
Methods inherited from class com.azure.resourcemanager.resources.fluentcore.dag.DAGNode
addDependency, addDependent, dependencyKeys, hasDependencies, isPreparer, lock, onSuccessfulResolution, removeDependency, setPreparer
-
Methods inherited from class com.azure.resourcemanager.resources.fluentcore.dag.Node
addChild, children, data, hasChildren, key, owner, removeChild, setOwner
-
-
-
-
Method Detail
-
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
public void setProxy(TaskGroupEntry<TaskT> proxy)
Set the proxy entry for this entry.- Parameters:
proxy- the proxy entry
-
proxy
public TaskGroupEntry<TaskT> proxy()
- Returns:
- the proxy entry if it is set, null if not set.
-
taskResult
public Indexable 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
protected void onFaultedResolution(String dependencyKey, Throwable throwable)
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
-
-