Package org.apache.sysds.runtime.util

## Class DependencyTask<E>

- java.lang.Object
- - org.apache.sysds.runtime.util.DependencyTask<E>

All Implemented Interfaces:
  `Comparable<DependencyTask<?>>`, `Callable<E>`

Direct Known Subclasses:
  `DependencyWrapperTask`

    public class DependencyTask<E>
    extends Object
    implements Comparable<DependencyTask<?>>, Callable<E>

### Field Summary

Fields
`List<DependencyTask<?>>` `_dependencyTasks` debugging dependency tasks only used if LOG.isDebugEnabled

### Constructor Summary

Constructors
`DependencyTask​(Callable<E> task, List<DependencyTask<?>> dependantTasks)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addDependent​(DependencyTask<?> dependencyTask)`
`void` `addPool​(ExecutorService pool)`
`void` `assignFuture​(CompletableFuture<Future<?>> f)`
`E` `call()`
`int` `compareTo​(DependencyTask<?> task)`
`boolean` `hasDependency​(DependencyTask<?> dependencyTask)`
`boolean` `isReady()`
`void` `setPriority​(int priority)`
`String` `toString()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Field Detail

#### _dependencyTasks

    public List<DependencyTask<?>> _dependencyTasks

debugging dependency tasks only used if LOG.isDebugEnabled

### Constructor Detail

#### DependencyTask

    public DependencyTask​(Callable<E> task,
                          List<DependencyTask<?>> dependantTasks)

### Method Detail

#### addPool

    public void addPool​(ExecutorService pool)

#### assignFuture

    public void assignFuture​(CompletableFuture<Future<?>> f)

#### isReady

    public boolean isReady()

#### setPriority

    public void setPriority​(int priority)

#### addDependent

    public void addDependent​(DependencyTask<?> dependencyTask)

#### hasDependency

    public boolean hasDependency​(DependencyTask<?> dependencyTask)

#### call

    public E call()
           throws Exception

Specified by:
  `call` in interface `Callable<E>`
Throws:
  `Exception`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`

#### compareTo

    public int compareTo​(DependencyTask<?> task)

Specified by:
  `compareTo` in interface `Comparable<E>`