接口 TaskExecutor
- 所有超级接口:
Executor
- 所有已知子接口:
AsyncListenableTaskExecutor,AsyncTaskExecutor
- 函数接口:
- 这是一个函数接口, 因此可用作 lambda 表达式或方法引用的赋值目标。
Simple task executor interface that abstracts the execution
of a
Runnable.
Implementations can use all sorts of different execution strategies, such as: synchronous, asynchronous, using a thread pool, and more.
- 从以下版本开始:
- 4.0
- 作者:
- Juergen Hoeller
- 另请参阅:
-
方法概要
-
方法详细资料
-
execute
Execute the giventask.The call might return immediately if the implementation uses an asynchronous execution strategy, or might block in the case of synchronous execution.
- 指定者:
execute在接口中Executor- 参数:
task- theRunnableto execute (nevernull)- 抛出:
TaskRejectedException- if the given task was not accepted
-