Class TaskExecutor.TaskGroup<T>

java.lang.Object
org.apache.lucene.search.TaskExecutor.TaskGroup<T>
Type Parameters:
T - the return type of all the callables
Enclosing class:
TaskExecutor

private static final class TaskExecutor.TaskGroup<T> extends Object
Holds all the sub-tasks that a certain operation gets split into as it gets parallelized and exposes the ability to invoke such tasks and wait for them all to complete their execution and provide their results. Additionally, if one task throws an exception, all other tasks from the same group are cancelled, to avoid needless computation as their results would not be exposed anyways. Creates one FutureTask for each Callable provided