Package com.ibm.fhir.task.core.impl
Class TaskGroup
- java.lang.Object
-
- com.ibm.fhir.task.core.impl.TaskGroup
-
- All Implemented Interfaces:
ITaskGroup
public class TaskGroup extends Object implements ITaskGroup
The TaskGroup to organize a set of ongoing or pending tasks.
-
-
Constructor Summary
Constructors Constructor Description TaskGroup(String taskId, TaskManager tmgr, Runnable task)
Public constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addChildTaskGroups(List<ITaskGroup> children)
Add the list of children to this task group, and make sure each of those children know what we are its parentvoid
addDependsOnThis(ITaskGroup tg)
Add the givenITaskGroup
to the list of task groups depending on this task group.void
addParent(ITaskGroup parent)
Add the given parent as one of the parents of this task groupboolean
equals(Object other)
String
getTaskId()
int
hashCode()
void
runTask()
Called when the ExecutorService executes this taskvoid
runTask(ExecutorService pool)
Submit this task to the thread-poolvoid
taskCompletionCallback(ITaskGroup tg)
Called when a child task completes.String
toString()
-
-
-
Constructor Detail
-
TaskGroup
public TaskGroup(String taskId, TaskManager tmgr, Runnable task)
Public constructor- Parameters:
taskId
-tmgr
-task
-
-
-
Method Detail
-
getTaskId
public String getTaskId()
- Specified by:
getTaskId
in interfaceITaskGroup
-
addDependsOnThis
public void addDependsOnThis(ITaskGroup tg)
Add the givenITaskGroup
to the list of task groups depending on this task group. These task groups will be notified when we are completed.- Parameters:
tg
-
-
taskCompletionCallback
public void taskCompletionCallback(ITaskGroup tg)
Description copied from interface:ITaskGroup
Called when a child task completes.- Specified by:
taskCompletionCallback
in interfaceITaskGroup
-
addChildTaskGroups
public void addChildTaskGroups(List<ITaskGroup> children)
Add the list of children to this task group, and make sure each of those children know what we are its parent- Parameters:
children
-
-
runTask
public void runTask(ExecutorService pool)
Submit this task to the thread-pool- Parameters:
pool
-
-
runTask
public void runTask()
Called when the ExecutorService executes this task
-
addParent
public void addParent(ITaskGroup parent)
Description copied from interface:ITaskGroup
Add the given parent as one of the parents of this task group- Specified by:
addParent
in interfaceITaskGroup
-
-