org.apache.catalina.core.StandardThreadExecutor Java Examples

The following examples show how to use org.apache.catalina.core.StandardThreadExecutor. 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: HermesTomcat.java    From hermes with Apache License 2.0 5 votes vote down vote up
public HermesTomcat() {
	initializeParameters();

	executor = new StandardThreadExecutor();
	executor.setMaxThreads(maxThreads);
	executor.setMaxQueueSize(maxQueueSize);
	executor.setNamePrefix("hermes-tomcat-exec-");
	executor.setName("hermes-tomcat-executor");
}
 
Example #2
Source File: ExecutorConf.java    From nano-framework with Apache License 2.0 5 votes vote down vote up
public StandardThreadExecutor init() {
    final StandardThreadExecutor executor = new StandardThreadExecutor();
    executor.setName(name);
    executor.setDaemon(daemon);
    executor.setNamePrefix(namePrefix);
    executor.setMaxThreads(maxThreads);
    executor.setMinSpareThreads(minSpareThreads);
    executor.setMaxIdleTime(maxIdleTime);
    executor.setMaxQueueSize(maxQueueSize);
    executor.setPrestartminSpareThreads(prestartminSpareThreads);
    executor.setThreadRenewalDelay(threadRenewalDelay);
    return executor;
}