Class TaskGroupEntry<TaskT extends TaskItem>

java.lang.Object
com.azure.resourcemanager.resources.fluentcore.dag.Node<TaskT,TaskGroupEntry<TaskT>>
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 Details

    • initialize

      public void initialize()
      Description copied from class: DAGNode
      Initialize the node so that traversal can be performed on the parent DAG.
      Overrides:
      initialize in class DAGNode<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()
      Gets the proxy entry.
      Returns:
      the proxy entry if it is set, null if not set.
    • taskResult

      public Indexable taskResult()
      Gets the result produced by the task.
      Returns:
      the result produced by the task.
    • hasFaultedDescentDependencyTasks

      public boolean hasFaultedDescentDependencyTasks()
      Check whether one or more decedent dependency tasks are in faulted state.
      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 emit ErroredDependencyTaskException will 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 invoked
      context - the context object shared across all the entries in the group that this entry belongs to, this will be passed to TaskItem.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: DAGNode
      Reports a dependency of this node has been faulted.
      Overrides:
      onFaultedResolution in class DAGNode<TaskT extends TaskItem,TaskGroupEntry<TaskT extends TaskItem>>
      Parameters:
      dependencyKey - the id of the dependency node
      throwable - the reason for unsuccessful resolution