Examples of ThreadPoolTaskExecutor


Examples of org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor

  }

  @Test
  public void threadPoolSizeDefault() {
    String name = "clientInboundChannelExecutor";
    ThreadPoolTaskExecutor executor = this.defaultContext.getBean(name, ThreadPoolTaskExecutor.class);
    assertEquals(Runtime.getRuntime().availableProcessors() * 2, executor.getCorePoolSize());
    // No way to verify queue capacity

    name = "clientOutboundChannelExecutor";
    executor = this.defaultContext.getBean(name, ThreadPoolTaskExecutor.class);
    assertEquals(Runtime.getRuntime().availableProcessors() * 2, executor.getCorePoolSize());

    name = "brokerChannelExecutor";
    executor = this.defaultContext.getBean(name, ThreadPoolTaskExecutor.class);
    assertEquals(0, executor.getCorePoolSize());
    assertEquals(1, executor.getMaxPoolSize());
  }
View Full Code Here

Examples of org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor

  public void setup() {
    this.messageChannel = new StubMessageChannel();
    this.template = new GenericMessagingTemplate();
    this.template.setDefaultDestination(this.messageChannel);
    this.template.setDestinationResolver(new TestDestinationResolver());
    this.executor = new ThreadPoolTaskExecutor();
    this.executor.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.