Skip to content
This repository was archived by the owner on Jun 15, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,14 @@
*/
public abstract class TaskGroupBase<T, U extends TaskItem<T>>
implements TaskGroup<T, U> {
/**
* Stores the tasks in this group and their dependency information.
*/
private DAGraph<U, DAGNode<U>> dag;
/**
* ServiceCall instance that aggregate a set of ServiceCalls each associated with
* the task in this group.
*/
private ParallelServiceCall parallelServiceCall;

/**
Expand Down Expand Up @@ -87,7 +94,7 @@ public T taskResult(String taskId) {
private void executeReadyTasksAsync(final ServiceCallback<T> callback) {
DAGNode<U> nextNode = dag.getNext();
while (nextNode != null) {
ServiceCall serviceCall = nextNode.data().executeAsync(taskCallback(nextNode, callback));
ServiceCall<T> serviceCall = nextNode.data().executeAsync(taskCallback(nextNode, callback));
this.parallelServiceCall.addCall(serviceCall);
nextNode = dag.getNext();
}
Expand Down Expand Up @@ -165,8 +172,10 @@ public boolean isCancelled() {
*
* @param call the call
*/
private void addCall(ServiceCall<?> call) {
this.serviceCalls.add(call);
private void addCall(ServiceCall call) {
if (call != null) {
this.serviceCalls.add(call);
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,5 @@ public interface TaskItem<U> {
* @param callback callback to call on success or failure
* @return the handle of the REST call
*/
ServiceCall executeAsync(ServiceCallback<U> callback);
ServiceCall<U> executeAsync(ServiceCallback<U> callback);
}