java.lang.Object | |||
↳ | org.springframework.util.CustomizableThreadCreator | ||
↳ | org.springframework.scheduling.concurrent.CustomizableThreadFactory | ||
↳ | org.springframework.scheduling.concurrent.ExecutorConfigurationSupport |
Known Direct Subclasses |
Base class for classes that are setting up a
java.util.concurrent.ExecutorService
(typically a java.util.concurrent.ThreadPoolExecutor).
Defines common configuration settings and common lifecycle handling.
ExecutorService
ThreadPoolExecutor
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
logger |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calls
initialize() after the container applied all property values. | |||||||||||
Calls
shutdown when the BeanFactory destroys
the task executor instance. | |||||||||||
Set up the ExecutorService.
| |||||||||||
Set the name of the bean in the bean factory that created this bean.
| |||||||||||
Set the RejectedExecutionHandler to use for the ThreadPoolExecutor.
| |||||||||||
Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool.
| |||||||||||
Specify the prefix to use for the names of newly created threads.
| |||||||||||
Set whether to wait for scheduled tasks to complete on shutdown.
| |||||||||||
Perform a shutdown on the ThreadPoolExecutor.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create the target
ExecutorService instance. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.scheduling.concurrent.CustomizableThreadFactory
| |||||||||||
From class
org.springframework.util.CustomizableThreadCreator
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.util.concurrent.ThreadFactory
| |||||||||||
From interface
org.springframework.beans.factory.BeanNameAware
| |||||||||||
From interface
org.springframework.beans.factory.DisposableBean
| |||||||||||
From interface
org.springframework.beans.factory.InitializingBean
|
Calls initialize()
after the container applied all property values.
Calls shutdown
when the BeanFactory destroys
the task executor instance.
Set up the ExecutorService.
Set the name of the bean in the bean factory that created this bean.
Invoked after population of normal bean properties but before an
init callback such as afterPropertiesSet()
or a custom init-method.
name | the name of the bean in the factory. Note that this name is the actual bean name used in the factory, which may differ from the originally specified name: in particular for inner bean names, the actual bean name might have been made unique through appending "#..." suffixes. Use the BeanFactoryUtils#originalBeanName(String) method to extract the original bean name (without suffix), if desired. |
---|
Set the RejectedExecutionHandler to use for the ThreadPoolExecutor. Default is the ThreadPoolExecutor's default abort policy.
Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool. Default is the ThreadPoolExecutor's default thread factory.
Specify the prefix to use for the names of newly created threads. Default is "SimpleAsyncTaskExecutor-".
Set whether to wait for scheduled tasks to complete on shutdown.
Default is "false". Switch this to "true" if you prefer fully completed tasks at the expense of a longer shutdown phase.
Create the target ExecutorService
instance.
Called by afterPropertiesSet
.
threadFactory | the ThreadFactory to use |
---|---|
rejectedExecutionHandler | the RejectedExecutionHandler to use |