|
@@ -1,11 +1,7 @@
|
|
|
package com.galaxis.manatee.configuration;
|
|
|
|
|
|
-import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.scheduling.annotation.EnableAsync;
|
|
|
-import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
|
|
|
-
|
|
|
-import java.util.concurrent.Executor;
|
|
|
|
|
|
/**
|
|
|
* @author zcj
|
|
@@ -16,34 +12,34 @@ import java.util.concurrent.Executor;
|
|
|
@EnableAsync
|
|
|
public class SpringAsyncConfiguration {
|
|
|
|
|
|
- @Bean(name = "taskExecutor")
|
|
|
- public Executor taskExecutor()
|
|
|
- {
|
|
|
- ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
- return executor;
|
|
|
- }
|
|
|
-
|
|
|
- @Bean(name = "updateExecutor")
|
|
|
- public Executor updateExecutor()
|
|
|
- {
|
|
|
- ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
- executor.setCorePoolSize(3);
|
|
|
- executor.setMaxPoolSize(50000);
|
|
|
- executor.setQueueCapacity(100);
|
|
|
- executor.setThreadNamePrefix("updateExecutor-");
|
|
|
- executor.initialize();
|
|
|
- return executor;
|
|
|
- }
|
|
|
-
|
|
|
- @Bean(name = "standardExecutor")
|
|
|
- public Executor standardExecutor()
|
|
|
- {
|
|
|
- ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
- executor.setCorePoolSize(3);
|
|
|
- executor.setMaxPoolSize(50000);
|
|
|
- executor.setQueueCapacity(100);
|
|
|
- executor.setThreadNamePrefix("standardExecutor-");
|
|
|
- executor.initialize();
|
|
|
- return executor;
|
|
|
- }
|
|
|
+// @Bean(name = "taskExecutor")
|
|
|
+// public Executor taskExecutor()
|
|
|
+// {
|
|
|
+// ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
+// return executor;
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Bean(name = "updateExecutor")
|
|
|
+// public Executor updateExecutor()
|
|
|
+// {
|
|
|
+// ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
+// executor.setCorePoolSize(3);
|
|
|
+// executor.setMaxPoolSize(50000);
|
|
|
+// executor.setQueueCapacity(100);
|
|
|
+// executor.setThreadNamePrefix("updateExecutor-");
|
|
|
+// executor.initialize();
|
|
|
+// return executor;
|
|
|
+// }
|
|
|
+//
|
|
|
+// @Bean(name = "standardExecutor")
|
|
|
+// public Executor standardExecutor()
|
|
|
+// {
|
|
|
+// ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
|
|
|
+// executor.setCorePoolSize(3);
|
|
|
+// executor.setMaxPoolSize(50000);
|
|
|
+// executor.setQueueCapacity(100);
|
|
|
+// executor.setThreadNamePrefix("standardExecutor-");
|
|
|
+// executor.initialize();
|
|
|
+// return executor;
|
|
|
+// }
|
|
|
}
|