Java Code Examples for org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean#setRejectedExecutionHandler()
The following examples show how to use
org.springframework.scheduling.concurrent.ThreadPoolExecutorFactoryBean#setRejectedExecutionHandler() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AppConfig.java From cloudbreak with Apache License 2.0 | 5 votes |
@Bean public ThreadPoolExecutorFactoryBean getThreadPoolExecutorFactoryBean() { ThreadPoolExecutorFactoryBean executorFactoryBean = new ThreadPoolExecutorFactoryBean(); executorFactoryBean.setCorePoolSize(corePoolSize); executorFactoryBean.setMaxPoolSize(maxPoolSize); executorFactoryBean.setQueueCapacity(queueCapacity); executorFactoryBean.setRejectedExecutionHandler(persistRejectedThreadExecutionHandler); return executorFactoryBean; }
Example 2
Source File: RejectedThreadContext.java From cloudbreak with Apache License 2.0 | 5 votes |
@Bean public ThreadPoolExecutorFactoryBean getThreadPoolExecutorFactoryBean() { ThreadPoolExecutorFactoryBean executorFactoryBean = new ThreadPoolExecutorFactoryBean(); executorFactoryBean.setCorePoolSize(1); executorFactoryBean.setMaxPoolSize(2); executorFactoryBean.setQueueCapacity(2); executorFactoryBean.setRejectedExecutionHandler(persistRejectedThreadExecutionHandler); return executorFactoryBean; }
Example 3
Source File: StackCollectorContext.java From cloudbreak with Apache License 2.0 | 5 votes |
@Bean public ThreadPoolExecutorFactoryBean getThreadPoolExecutorFactoryBean() { ThreadPoolExecutorFactoryBean executorFactoryBean = new ThreadPoolExecutorFactoryBean(); executorFactoryBean.setCorePoolSize(1); executorFactoryBean.setMaxPoolSize(2); executorFactoryBean.setQueueCapacity(2); executorFactoryBean.setRejectedExecutionHandler(persistRejectedThreadExecutionHandler); return executorFactoryBean; }