Examples of ThreadPoolExecutorFactoryBean


Examples of org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean

    return SimpleShellCommandLineOptions.parseCommandLine(args);
  }

  @Bean
  ThreadPoolExecutorFactoryBean getThreadPoolExecutorFactoryBean() {
    return new ThreadPoolExecutorFactoryBean();
  }
View Full Code Here

Examples of org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean

            }
        };
       
        dataImportExportService.setXmlUtilities(xmlUtilities);
       
        final ThreadPoolExecutorFactoryBean threadPoolExecutorFactoryBean = new ThreadPoolExecutorFactoryBean();
        threadPoolExecutorFactoryBean.setCorePoolSize(0);
        threadPoolExecutorFactoryBean.setMaxPoolSize(20);
        threadPoolExecutorFactoryBean.setQueueCapacity(20);
        threadPoolExecutorFactoryBean.setThreadGroupName("uPortal-ImportExportThreadGroup");
        threadPoolExecutorFactoryBean.setThreadNamePrefix("uPortal-ImportExport-");
        threadPoolExecutorFactoryBean.setThreadPriority(5);
        threadPoolExecutorFactoryBean.setKeepAliveSeconds(30);
        threadPoolExecutorFactoryBean.setDaemon(true);
        threadPoolExecutorFactoryBean.setAllowCoreThreadTimeOut(true);
        threadPoolExecutorFactoryBean.setRejectedExecutionHandler(new ThreadPoolExecutor.CallerRunsPolicy());
        threadPoolExecutorFactoryBean.afterPropertiesSet();
       
        threadPoolExecutor = threadPoolExecutorFactoryBean.getObject();
        this.dataImportExportService.setImportExportThreadPool(threadPoolExecutor);
       
        dataImportExportService.setDataFileIncludes(ImmutableSet.of(
                "**/*.xml",
                "**/*.entity-type",
 
View Full Code Here

Examples of org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean

       
        final InputStream dataZipStream = this.getClass().getResourceAsStream("/org/jasig/portal/utils/DirScannerData.zip");
        ZipUtils.extract(dataZipStream, testDirectory);
        IOUtils.closeQuietly(dataZipStream);
       
        executorServiceFactory = new ThreadPoolExecutorFactoryBean();
        executorServiceFactory.setCorePoolSize(0);
        executorServiceFactory.setMaxPoolSize(1);
        executorServiceFactory.setQueueCapacity(500);
        executorServiceFactory.setKeepAliveSeconds(30);
        executorServiceFactory.setAllowCoreThreadTimeOut(true);
View Full Code Here

Examples of org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean

  public static void setUp() throws Exception {

    mongo = new MongoClient();
    template = new MongoTemplate(mongo, DATABASE_NAME);

    factory = new ThreadPoolExecutorFactoryBean();
    factory.setCorePoolSize(2);
    factory.setMaxPoolSize(10);
    factory.setWaitForTasksToCompleteOnShutdown(true);
    factory.afterPropertiesSet();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.