|
|
@ -1,17 +1,12 @@
|
|
|
|
package cn.hippo4j.starter.handler.web;
|
|
|
|
package cn.hippo4j.starter.handler.web;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.hippo4j.common.config.ApplicationContextHolder;
|
|
|
|
import cn.hippo4j.common.config.ApplicationContextHolder;
|
|
|
|
import cn.hippo4j.common.model.PoolParameterInfo;
|
|
|
|
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
|
import org.springframework.boot.web.context.WebServerApplicationContext;
|
|
|
|
import org.springframework.boot.web.context.WebServerApplicationContext;
|
|
|
|
import org.springframework.boot.web.server.WebServer;
|
|
|
|
import org.springframework.boot.web.server.WebServer;
|
|
|
|
import org.springframework.boot.web.servlet.context.ServletWebServerInitializedEvent;
|
|
|
|
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
import org.springframework.context.ApplicationContext;
|
|
|
|
import org.springframework.context.ApplicationListener;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.concurrent.Executor;
|
|
|
|
import java.util.concurrent.Executor;
|
|
|
|
import java.util.concurrent.ThreadPoolExecutor;
|
|
|
|
|
|
|
|
import java.util.concurrent.TimeUnit;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Abstract web thread pool service.
|
|
|
|
* Abstract web thread pool service.
|
|
|
@ -34,8 +29,6 @@ public abstract class AbstractWebThreadPoolService implements WebThreadPoolServi
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
protected abstract Executor getWebThreadPoolByServer(WebServer webServer);
|
|
|
|
protected abstract Executor getWebThreadPoolByServer(WebServer webServer);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Executor getWebThreadPool() {
|
|
|
|
public Executor getWebThreadPool() {
|
|
|
|
if (executor == null) {
|
|
|
|
if (executor == null) {
|
|
|
|