|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractFactoryBean
org.apache.mina.integration.spring.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.
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(RejectedExecutionHandler rejectedExecutionHandler)
Set the RejectedExecutionHandler to use for the ThreadPoolExecutor. |
void |
setThreadFactory(ThreadFactory threadFactory)
Set the ThreadFactory to use for the ThreadPoolExecutor's thread pool. |
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
,
SynchronousQueue
public void setThreadFactory(ThreadFactory threadFactory)
Executors#defaultThreadFactory()
public void setRejectedExecutionHandler(RejectedExecutionHandler rejectedExecutionHandler)
ThreadPoolExecutor.AbortPolicy
protected Object createInstance() throws Exception
Exception
protected void destroyInstance(Object o) throws Exception
Exception
public Class getObjectType()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |