Example usage for org.springframework.scheduling.concurrent ThreadPoolExecutorFactoryBean setQueueCapacity

List of usage examples for org.springframework.scheduling.concurrent ThreadPoolExecutorFactoryBean setQueueCapacity

Introduction

In this page you can find the example usage for org.springframework.scheduling.concurrent ThreadPoolExecutorFactoryBean setQueueCapacity.

Prototype

public void setQueueCapacity(int queueCapacity) 

Source Link

Document

Set the capacity for the ThreadPoolExecutor's BlockingQueue.

Usage

From source file:io.pivotal.strepsirrhini.chaoslemur.Application.java

@Bean(destroyMethod = "shutdown")
ThreadPoolExecutorFactoryBean executor() {
    ThreadPoolExecutorFactoryBean factoryBean = new ThreadPoolExecutorFactoryBean();
    factoryBean.setQueueCapacity(5);/*from w ww  . j  a  va  2  s .c  o  m*/
    factoryBean.setCorePoolSize(5);
    factoryBean.setMaxPoolSize(20);
    factoryBean.setThreadNamePrefix("destroyer-");

    return factoryBean;
}