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

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

Introduction

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

Prototype

@Override
    public void setThreadNamePrefix(@Nullable String threadNamePrefix) 

Source Link

Usage

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

@Bean(destroyMethod = "shutdown")
ThreadPoolExecutorFactoryBean executor() {
    ThreadPoolExecutorFactoryBean factoryBean = new ThreadPoolExecutorFactoryBean();
    factoryBean.setQueueCapacity(5);//  w w  w.  j  a  v a 2 s.co m
    factoryBean.setCorePoolSize(5);
    factoryBean.setMaxPoolSize(20);
    factoryBean.setThreadNamePrefix("destroyer-");

    return factoryBean;
}