This interface allows fine-grained dependency reporting for a given task. It should not be reused and is considered to be private to the user. The difference between this and TaskFuture is that instances of this should not be reused by different parts of client code.
The method setTaskOutputChangeDetector(
Instances of this interface should be used by only a single thread. Method calls should not overlap.
Instances of this interface is usually obtained from TaskFuture.asDependencyFuture() or
TaskContext.getTaskDependencyFuture(
Methods of this class may throw (but not required in all cases) IllegalTaskOperationException if it detects that they are being called after the caller task execution has finished. References to task dependency futures should not be retained after the task execution is over.
Clients should not implement this interface.
public TaskDependencyFuture< | clone() Clones the dependency future object, returning a clean one. |
public R | get() Retrieves the result of the associated task execution. |
public R | Retrieves the result of the associated task, given that it is already finished. |
public Object | Gets the modification stamp of the subject task. |
public TaskContext | Gets the task context which was used to retrieve this dependency future. |
public TaskIdentifier | Gets the task identifier of the subject task. |
public void | setTaskOutputChangeDetector( Sets the output change detector for the subject task dependency. |
The returned dependency future is semantically the same as if a new one was directly retrieved using
TaskContext.getTaskDependencyFuture(
This call will wait for the task if necessary and report an input dependency on it.
The output change detector for the reported task dependency will be CommonTaskOutputChangeDetector.ALWAYS
by default. It can be replaced if the client calls setTaskOutputChangeDetector(
If this method throws a TaskExecutionFailedException, it is considered to be a valid return scenario. A dependency on the the associated task will be installed as if a return value was returned.
Callers should handle the possiblity of tasks returning StructuredTaskResult instances.
The output change detector for the reported task dependency will be CommonTaskOutputChangeDetector.ALWAYS
by default. It can be replaced if the client calls setTaskOutputChangeDetector(
Important: See TaskFuture.getFinished() for the requirements for calling this method.
Callers should handle the possiblity of tasks returning StructuredTaskResult instances.
See TaskFuture.getModificationStamp() for documentation.
If the task dependency was not yet reported this task, this method reports it. The output change detector will be applied for this particular dependency on the task.
If the build runtime detects a change in the task output, the caller task will be rerun with an appropriate delta.
This method can be called more than once to add multiple change detectors.
null
.