References Deprecated
AsyncListenableTaskExecutor is deprecated or references (maybe indirectly) at least one deprecated element.
See corresponding docs for further information.
java.util.concurrent.Executor and
exposes a Spring org.springframework.core.task.TaskExecutor for it.
Also detects an extended java.util.concurrent.ExecutorService, adapting
the org.springframework.core.task.AsyncTaskExecutor interface accordingly.
java.util.concurrent.Executor , java.util.concurrent.ExecutorService , java.util.concurrent.Executors
| Modifier and Type | Field and Description |
|---|---|
| private final Executor | |
| private TaskDecorator |
| Access | Constructor and Description |
|---|---|
| public | TaskExecutorAdapter(Executor
the JDK concurrent executor to delegate to concurrentExecutor)Create a new TaskExecutorAdapter, using the given JDK concurrent executor. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | doExecute(Executor
the underlying JDK concurrent executor to delegate to concurrentExecutor, TaskDecorator the specified decorator to be applied, if any taskDecorator, Runnable the runnable to execute runnable)Actually execute the given |
| public void | execute(Runnable
the task)Runnable to execute (never null)Implements org. Delegates to the specified JDK concurrent executor. |
| public final void | setTaskDecorator(TaskDecorator taskDecorator)
Specify a custom |
| public Future | submit(Runnable
the task)Runnable to execute (never null)Overrides default org. Submit a Runnable task for execution, receiving a Future representing that task. |
| public <T> Future | submit(Callable<T>
the task)Callable to execute (never null)Overrides default org. Submit a Callable task for execution, receiving a Future representing that task. |
| public ListenableFuture | submitListenable(Runnable
the task)Runnable to execute (never null)Implements org.
References Deprecated
ListenableFuture is deprecated or references (maybe indirectly) at least one deprecated element.
Submit a |
| public <T> ListenableFuture | submitListenable(Callable<T>
the task)Callable to execute (never null)Implements org.
References Deprecated
ListenableFuture is deprecated or references (maybe indirectly) at least one deprecated element.
Submit a |
| concurrentExecutor | back to summary |
|---|---|
| private final Executor concurrentExecutor | |
| taskDecorator | back to summary |
|---|---|
| private TaskDecorator taskDecorator
| |
| TaskExecutorAdapter | back to summary |
|---|---|
| public TaskExecutorAdapter(Executor concurrentExecutor) Create a new TaskExecutorAdapter, using the given JDK concurrent executor.
| |
| doExecute | back to summary |
|---|---|
| protected void doExecute(Executor concurrentExecutor, TaskDecorator taskDecorator, Runnable runnable) throws RejectedExecutionException Actually execute the given
| |
| execute | back to summary |
|---|---|
| public void execute(Runnable task) Implements org. Delegates to the specified JDK concurrent executor.
| |
| setTaskDecorator | back to summary |
|---|---|
| public final void setTaskDecorator(TaskDecorator taskDecorator) Specify a custom Note that such a decorator is not necessarily being applied to the
user-supplied The primary use case is to set some execution context around the task's invocation, or to provide some monitoring/statistics for task execution. Note Exception handling in
| |
| submit | back to summary |
|---|---|
| public Future Overrides default org. Doc from org. Submit a Runnable task for execution, receiving a Future representing that task.
The Future will return a As of 6.1, this method comes with a default implementation that delegates
to | |
| submit | back to summary |
|---|---|
| public <T> Future Overrides default org. Doc from org. Submit a Callable task for execution, receiving a Future representing that task. The Future will return the Callable's result upon completion. As of 6.1, this method comes with a default implementation that delegates
to | |
| submitListenable | back to summary |
|---|---|
| public ListenableFuture Implements org. Doc from org. References Deprecated
See corresponding docs for further information. Submit a
| |
| submitListenable | back to summary |
|---|---|
| public <T> ListenableFuture Implements org. Doc from org. References Deprecated
See corresponding docs for further information. Submit a
| |