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
Modifier and Type
Field
Description
`List<DependencyTask<?>>`
`_dependencyTasks`
debugging dependency tasks only used if LOG.isDebugEnabled

## Constructor Summary

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

## Method Summary

Modifier and Type
Method
Description
`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 Details

### _dependencyTasks

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

## Constructor Details

### DependencyTask

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

## Method Details

### 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>`