public class DelegatingExecutor
extends java.lang.Object
implements org.springframework.core.task.TaskExecutor
In addition to the delegate, the async configuration properties and the task name is stored, so we know which task this executor is for and we are able to determine the timeout.
Constructor and Description |
---|
DelegatingExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor delegate,
ExecutorConfigurationProperties executorConfigurationProperties,
java.lang.String taskName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(java.lang.Runnable task) |
ExecutorStatisticsView |
getExecutorStatistics()
Return the view on the statistics.
|
public DelegatingExecutor(org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor delegate, ExecutorConfigurationProperties executorConfigurationProperties, java.lang.String taskName)
delegate
- the delegateexecutorConfigurationProperties
- the configuration propertiestaskName
- the task namepublic void execute(java.lang.Runnable task)
Configures a SharedTaskContextHolder
before delegating execution.
execute
in interface java.util.concurrent.Executor
execute
in interface org.springframework.core.task.TaskExecutor
public ExecutorStatisticsView getExecutorStatistics()