|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.springframework.scheduling.concurrent.ForkJoinPoolFactoryBean
public class ForkJoinPoolFactoryBean
A Spring FactoryBean that builds and exposes a preconfigured ForkJoinPool.
May be used on Java 7 as well as on Java 6 with jsr166.jar on the classpath
(ideally on the VM bootstrap classpath).
For details on the ForkJoinPool API and its use with RecursiveActions, see the JDK 7 javadoc.
jsr166.jar, containing java.util.concurrent updates for Java 6, can be obtained
from the concurrency interest website.
| Constructor Summary | |
|---|---|
ForkJoinPoolFactoryBean()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
void |
destroy()
|
java.util.concurrent.ForkJoinPool |
getObject()
|
java.lang.Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setAsyncMode(boolean asyncMode)
Specify whether to establish a local first-in-first-out scheduling mode for forked tasks that are never joined. |
void |
setParallelism(int parallelism)
Specify the parallelism level. |
void |
setThreadFactory(java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)
Set the factory for creating new ForkJoinWorkerThreads. |
void |
setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Set the handler for internal worker threads that terminate due to unrecoverable errors encountered while executing tasks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ForkJoinPoolFactoryBean()
| Method Detail |
|---|
public void setParallelism(int parallelism)
Runtime.availableProcessors().
public void setThreadFactory(java.util.concurrent.ForkJoinPool.ForkJoinWorkerThreadFactory threadFactory)
ForkJoinPool.defaultForkJoinWorkerThreadFactory.
public void setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
public void setAsyncMode(boolean asyncMode)
true) may be more appropriate
than the default locally stack-based mode in applications in which worker threads only
process event-style asynchronous tasks. Default is false.
public void afterPropertiesSet()
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBeanpublic java.util.concurrent.ForkJoinPool getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<java.util.concurrent.ForkJoinPool>public java.lang.Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<java.util.concurrent.ForkJoinPool>public boolean isSingleton()
isSingleton in interface org.springframework.beans.factory.FactoryBean<java.util.concurrent.ForkJoinPool>public void destroy()
destroy in interface org.springframework.beans.factory.DisposableBean
|
spring-context | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||