|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.beans.factory.config.AbstractFactoryBean
org.apache.mina.integration.spring.ThreadPoolExecutorFactoryBean
public class ThreadPoolExecutorFactoryBean
Spring FactoryBean which enables the configuration of
ThreadPoolExecutor instances using Spring. Most of this code
has been copied from the ThreadPoolTaskExecutor class
available in Spring 2.0.
| Field Summary |
|---|
| Fields inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
|---|
logger |
| Constructor Summary | |
|---|---|
ThreadPoolExecutorFactoryBean()
|
|
| Method Summary | |
|---|---|
protected Object |
createInstance()
|
protected void |
destroyInstance(Object o)
|
Class |
getObjectType()
|
void |
setCorePoolSize(int corePoolSize)
Set the ThreadPoolExecutor's core pool size. |
void |
setKeepAliveSeconds(int keepAliveSeconds)
Set the ThreadPoolExecutor's keep alive seconds. |
void |
setMaxPoolSize(int maxPoolSize)
Set the ThreadPoolExecutor's maximum pool size. |
void |
setQueueCapacity(int queueCapacity)
Set the capacity for the ThreadPoolExecutor's BlockingQueue. |
void |
setRejectedExecutionHandler(edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
Set the RejectedExecutionHandler to use for the ThreadPoolExecutor. |
void |
setThreadFactory(edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory threadFactory)
Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool. |
| Methods inherited from class org.springframework.beans.factory.config.AbstractFactoryBean |
|---|
afterPropertiesSet, destroy, getObject, isSingleton, setSingleton |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadPoolExecutorFactoryBean()
| Method Detail |
|---|
public void setCorePoolSize(int corePoolSize)
public void setMaxPoolSize(int maxPoolSize)
Integer.MAX_VALUE.
public void setKeepAliveSeconds(int keepAliveSeconds)
public void setQueueCapacity(int queueCapacity)
Integer.MAX_VALUE.
Any positive value will lead to a LinkedBlockingQueue instance; any other value will lead to a SynchronousQueue instance.
LinkedBlockingQueue,
SynchronousQueuepublic void setThreadFactory(edu.emory.mathcs.backport.java.util.concurrent.ThreadFactory threadFactory)
Executors.defaultThreadFactory()public void setRejectedExecutionHandler(edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler rejectedExecutionHandler)
ThreadPoolExecutor.AbortPolicy
protected Object createInstance()
throws Exception
createInstance in class AbstractFactoryBeanException
protected void destroyInstance(Object o)
throws Exception
destroyInstance in class AbstractFactoryBeanExceptionpublic Class getObjectType()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||