當前位置: 首頁>>代碼示例>>Java>>正文


Java ThreadPoolTaskExecutor.setQueueCapacity方法代碼示例

本文整理匯總了Java中org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.setQueueCapacity方法的典型用法代碼示例。如果您正苦於以下問題:Java ThreadPoolTaskExecutor.setQueueCapacity方法的具體用法?Java ThreadPoolTaskExecutor.setQueueCapacity怎麽用?Java ThreadPoolTaskExecutor.setQueueCapacity使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor的用法示例。


在下文中一共展示了ThreadPoolTaskExecutor.setQueueCapacity方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(5);
    executor.setMaxPoolSize(50);

    executor.setWaitForTasksToCompleteOnShutdown(true);

    executor.setQueueCapacity(10000);
    executor.setThreadNamePrefix("cloudunit-Executor-");
    executor.initialize();
    return executor;
}
 
開發者ID:oncecloud,項目名稱:devops-cstack,代碼行數:16,代碼來源:AsyncConfiguration.java

示例2: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("configuration-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:xm-online,項目名稱:xm-ms-config,代碼行數:12,代碼來源:AsyncConfiguration.java

示例3: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("blog-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:IBM,項目名稱:Microservices-with-JHipster-and-Spring-Boot,代碼行數:12,代碼來源:AsyncConfiguration.java

示例4: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("j-hipster-registry-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:oktadeveloper,項目名稱:jhipster-microservices-example,代碼行數:12,代碼來源:AsyncConfiguration.java

示例5: getSelectieJobAyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Bean
@Qualifier("selectiejob")
public Executor getSelectieJobAyncExecutor() {
    ThreadPoolTaskExecutor threadPoolTaskExecutor = new ThreadPoolTaskExecutor();
    threadPoolTaskExecutor.setCorePoolSize(1);
    threadPoolTaskExecutor.setMaxPoolSize(1);
    threadPoolTaskExecutor.setQueueCapacity(0);
    threadPoolTaskExecutor.setKeepAliveSeconds(0);
    threadPoolTaskExecutor.initialize();
    return threadPoolTaskExecutor;
}
 
開發者ID:MinBZK,項目名稱:OperatieBRP,代碼行數:12,代碼來源:JobAsyncConfiguration.java

示例6: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
public Executor getAsyncExecutor() {
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(2);
    executor.setMaxPoolSize(100);
    executor.setQueueCapacity(500);
    executor.setThreadNamePrefix("AsyncProcess-");
    executor.initialize();
    return executor;
}
 
開發者ID:TulevaEE,項目名稱:onboarding-service,代碼行數:11,代碼來源:AsyncConfiguration.java

示例7: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("task-executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:quanticc,項目名稱:sentry,代碼行數:12,代碼來源:AsyncConfiguration.java

示例8: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("gate-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:xm-online,項目名稱:xm-gate,代碼行數:12,代碼來源:AsyncConfiguration.java

示例9: newTaskExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
private Executor newTaskExecutor(final String taskExecutorNamePrefix) {
    final ApplicationProperties.Async asyncProperties = applicationProperties.getAsync();
    final ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(asyncProperties.getCorePoolSize());
    executor.setMaxPoolSize(asyncProperties.getMaxPoolSize());
    executor.setQueueCapacity(asyncProperties.getQueueCapacity());
    executor.setThreadNamePrefix(taskExecutorNamePrefix);
    return executor;
}
 
開發者ID:karlkyck,項目名稱:spring-boot-completablefuture,代碼行數:10,代碼來源:AsyncConfiguration.java

示例10: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("balance-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:xm-online,項目名稱:xm-ms-balance,代碼行數:12,代碼來源:AsyncConfiguration.java

示例11: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("spring-io-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:deepu105,項目名稱:spring-io,代碼行數:12,代碼來源:AsyncConfiguration.java

示例12: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
public Executor getAsyncExecutor() {
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(5);
    executor.setMaxPoolSize(5);
    executor.setQueueCapacity(500);
    executor.setThreadNamePrefix("Chameleon-");
    executor.initialize();

    return executor;
}
 
開發者ID:Azure,項目名稱:CityPower-Build-Sample,代碼行數:12,代碼來源:AsyncConfig.java

示例13: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("cms-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:deepu105,項目名稱:spring-io,代碼行數:12,代碼來源:AsyncConfiguration.java

示例14: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("armory-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:ElectronicArmory,項目名稱:Armory,代碼行數:12,代碼來源:AsyncConfiguration.java

示例15: getAsyncExecutor

import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; //導入方法依賴的package包/類
@Override
@Bean(name = "taskExecutor")
public Executor getAsyncExecutor() {
    log.debug("Creating Async Task Executor");
    ThreadPoolTaskExecutor executor = new ThreadPoolTaskExecutor();
    executor.setCorePoolSize(jHipsterProperties.getAsync().getCorePoolSize());
    executor.setMaxPoolSize(jHipsterProperties.getAsync().getMaxPoolSize());
    executor.setQueueCapacity(jHipsterProperties.getAsync().getQueueCapacity());
    executor.setThreadNamePrefix("torg-crm-Executor-");
    return new ExceptionHandlingAsyncTaskExecutor(executor);
}
 
開發者ID:torgcrm,項目名稱:TorgCRM-Server,代碼行數:12,代碼來源:AsyncConfiguration.java


注:本文中的org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor.setQueueCapacity方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。