|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
R
- the Task
's result typepublic interface TaskExecutor<R>
TaskExecutors provide execution services for Task
s. A TaskExecutor deals with
Task
s returning a particular type of result only. TaskExecutors are typically relatively
light-weight wrappers provided by TaskService
s, being merely submission receptacles for
tasks, so that they can be created wherever some kind of asynchronous execution of a particular
kind of task is needed.
Method Summary | ||
---|---|---|
void |
cancelAll()
Cancel all pending tasks for this executor's scope. |
|
|
execute(Task<T> task)
Execute the given Task . |
|
int |
getPriority()
Return the priority of Task s submitted using this executor. |
|
void |
setPriority(int priority)
Set the priority of Task s submitted using this executor. |
Method Detail |
---|
<T extends R> Future<T> execute(Task<T> task)
Task
.
task
- the task
Future
associated with the taskvoid cancelAll()
int getPriority()
Task
s submitted using this executor.
void setPriority(int priority)
Task
s submitted using this executor.
priority
- the priority to set
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |