diff --git a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java index 19cd880bbb..3e04248ea8 100644 --- a/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java +++ b/spring-context/src/main/java/org/springframework/scheduling/concurrent/ThreadPoolExecutorFactoryBean.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2012 the original author or authors. + * Copyright 2002-2013 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -126,7 +126,7 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport *
Default is "false", exposing the raw executor as bean reference.
* Switch this flag to "true" to strictly prevent clients from
* modifying the executor's configuration.
- * @see java.util.concurrent.Executors#unconfigurableScheduledExecutorService
+ * @see java.util.concurrent.Executors#unconfigurableExecutorService
*/
public void setExposeUnconfigurableExecutor(boolean exposeUnconfigurableExecutor) {
this.exposeUnconfigurableExecutor = exposeUnconfigurableExecutor;
@@ -137,9 +137,8 @@ public class ThreadPoolExecutorFactoryBean extends ExecutorConfigurationSupport
ThreadFactory threadFactory, RejectedExecutionHandler rejectedExecutionHandler) {
BlockingQueue The default implementation creates a standard {@link ThreadPoolExecutor}.
+ * Can be overridden to provide custom {@link ThreadPoolExecutor} subclasses.
+ * @param corePoolSize the specified core pool size
+ * @param maxPoolSize the specified maximum pool size
+ * @param keepAliveSeconds the specified keep-alive time in seconds
+ * @param queue the BlockingQueue to use
+ * @param threadFactory the ThreadFactory to use
+ * @param rejectedExecutionHandler the RejectedExecutionHandler to use
+ * @return a new ThreadPoolExecutor instance
+ * @see #afterPropertiesSet()
+ */
+ protected ThreadPoolExecutor createExecutor(
+ int corePoolSize, int maxPoolSize, int keepAliveSeconds, BlockingQueue A LinkedBlockingQueue instance will be created for a positive