Package org.apache.pivot.util.concurrent
Class TaskGroup
- java.lang.Object
-
- org.apache.pivot.util.concurrent.Task<java.lang.Void>
-
- org.apache.pivot.util.concurrent.TaskGroup
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.util.concurrent.Task
abort, DEFAULT_EXECUTOR_SERVICE, timeout
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidabort()Aborts all tasks in this group.booleanadd(Task<?> element)Adds an element to the group.booleancontains(Task<?> element)Tests the existence of an element in the group.java.lang.Voidexecute()Synchronously executes the task.intgetCount()java.util.Iterator<Task<?>>iterator()booleanremove(Task<?> element)Removes an element from the group.-
Methods inherited from class org.apache.pivot.util.concurrent.Task
execute, execute, getBackgroundThread, getExecutorService, getFault, getResult, getTimeout, isPending, setTimeout
-
-
-
-
Method Detail
-
execute
public java.lang.Void execute() throws TaskExecutionExceptionDescription copied from class:TaskSynchronously executes the task.- Specified by:
executein classTask<java.lang.Void>- Returns:
- The result of the task's execution.
- Throws:
TaskExecutionException- If an error occurs while executing the task.
-
abort
public void abort()
Aborts all tasks in this group.
-
add
public boolean add(Task<?> element)
Description copied from interface:GroupAdds an element to the group.
-
remove
public boolean remove(Task<?> element)
Description copied from interface:GroupRemoves an element from the group.
-
contains
public boolean contains(Task<?> element)
Description copied from interface:GroupTests the existence of an element in the group.
-
getCount
public int getCount()
-
-