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 void
abort()
Aborts all tasks in this group.boolean
add(Task<?> element)
Adds an element to the group.boolean
contains(Task<?> element)
Tests the existence of an element in the group.java.lang.Void
execute()
Synchronously executes the task.int
getCount()
java.util.Iterator<Task<?>>
iterator()
boolean
remove(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 TaskExecutionException
Description copied from class:Task
Synchronously executes the task.- Specified by:
execute
in 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:Group
Adds an element to the group.
-
remove
public boolean remove(Task<?> element)
Description copied from interface:Group
Removes an element from the group.
-
contains
public boolean contains(Task<?> element)
Description copied from interface:Group
Tests the existence of an element in the group.
-
getCount
public int getCount()
-
-