Class TaskGroupEntry<TaskT extends TaskItem>

  • 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 Detail

      • 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 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.