java.lang.Objectorg.springframework.util.CustomizableThreadCreator
org.springframework.scheduling.backportconcurrent.CustomizableThreadFactory
org.springframework.scheduling.backportconcurrent.ThreadPoolTaskExecutor
All Implemented Interfaces:
DisposableBean, BeanNameAware, SchedulingTaskExecutor, edu.emory.mathcs.backport.java.util.concurrent.Executor, InitializingBean, edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory
For any custom needs, in particular for defining a edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor , it is recommended to use a straight definition of the Executor instance or a factory method definition that points to the JSR-166 backport edu.emory.mathcs.backport.java.util.concurrent.Executors class. To expose such a raw Executor as a Spring org.springframework.core.task.TaskExecutor , simply wrap it with a ConcurrentTaskExecutor adapter.
NOTE: This class implements Spring's org.springframework.core.task.TaskExecutor interface as well as the JSR-166 edu.emory.mathcs.backport.java.util.concurrent.Executor interface, with the former being the primary interface, the other just serving as secondary convenience. For this reason, the exception handling follows the TaskExecutor contract rather than the Executor contract, in particular regarding the org.springframework.core.task.TaskRejectedException .
Juergen - Hoeller2.0.3 - | Field Summary | ||
|---|---|---|
| protected final Log | logger | |
| Method from org.springframework.scheduling.backportconcurrent.ThreadPoolTaskExecutor Summary: |
|---|
| afterPropertiesSet, createQueue, destroy, execute, getActiveCount, getCorePoolSize, getKeepAliveSeconds, getMaxPoolSize, getPoolSize, getThreadPoolExecutor, initialize, prefersShortLivedTasks, setAllowCoreThreadTimeOut, setBeanName, setCorePoolSize, setKeepAliveSeconds, setMaxPoolSize, setQueueCapacity, setRejectedExecutionHandler, setThreadFactory, setThreadNamePrefix, setWaitForTasksToCompleteOnShutdown, shutdown |
| Methods from org.springframework.scheduling.backportconcurrent.CustomizableThreadFactory: |
|---|
| newThread |
| Methods from org.springframework.util.CustomizableThreadCreator: |
|---|
| createThread, getDefaultThreadNamePrefix, getThreadGroup, getThreadNamePrefix, getThreadPriority, isDaemon, nextThreadName, setDaemon, setThreadGroup, setThreadGroupName, setThreadNamePrefix, setThreadPriority |
| Methods from java.lang.Object: |
|---|
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from org.springframework.scheduling.backportconcurrent.ThreadPoolTaskExecutor Detail: |
|---|
initialize() after the container applied all property values. |
A LinkedBlockingQueue instance will be created for a positive capacity value; a SynchronousQueue else. |
shutdown when the BeanFactory destroys
the task executor instance. |
|
|
|
|
|
|
|
|
|
Default is "false". Note that this feature is only available on backport-concurrent 3.0 or above (based on the code in Java 6). |
|
This setting can be modified at runtime, for example through JMX. |
This setting can be modified at runtime, for example through JMX. |
Integer.MAX_VALUE.
This setting can be modified at runtime, for example through JMX. |
Integer.MAX_VALUE.
Any positive value will lead to a LinkedBlockingQueue instance; any other value will lead to a SynchronousQueue instance. |
|
Default is this executor itself (i.e. the factory that this executor inherits from). See org.springframework.util.CustomizableThreadCreator 's javadoc for available bean properties. |
|
Default is "false". Switch this to "true" if you prefer fully completed tasks at the expense of a longer shutdown phase. |
|