use of com.alipay.sofa.rpc.server.SofaRejectedExecutionHandler in project sofa-rpc by sofastack.
the class AbstractHttpServer method initThreadPool.
protected ThreadPoolExecutor initThreadPool(ServerConfig serverConfig) {
ThreadPoolExecutor threadPool = BusinessPool.initPool(serverConfig);
threadPool.setThreadFactory(new NamedThreadFactory("SEV-" + serverConfig.getProtocol().toUpperCase() + "-BIZ-" + serverConfig.getPort(), serverConfig.isDaemon()));
threadPool.setRejectedExecutionHandler(new SofaRejectedExecutionHandler());
if (serverConfig.isPreStartCore()) {
// 初始化核心线程池
threadPool.prestartAllCoreThreads();
}
return threadPool;
}
use of com.alipay.sofa.rpc.server.SofaRejectedExecutionHandler in project sofa-rpc by sofastack.
the class BoltServer method initThreadPool.
protected ThreadPoolExecutor initThreadPool(ServerConfig serverConfig) {
ThreadPoolExecutor threadPool = BusinessPool.initPool(serverConfig);
threadPool.setThreadFactory(new NamedThreadFactory("SEV-BOLT-BIZ-" + serverConfig.getPort(), serverConfig.isDaemon()));
threadPool.setRejectedExecutionHandler(new SofaRejectedExecutionHandler());
if (serverConfig.isPreStartCore()) {
// 初始化核心线程池
threadPool.prestartAllCoreThreads();
}
return threadPool;
}
use of com.alipay.sofa.rpc.server.SofaRejectedExecutionHandler in project sofa-rpc by sofastack.
the class TripleServer method initThreadPool.
protected ThreadPoolExecutor initThreadPool(ServerConfig serverConfig) {
ThreadPoolExecutor threadPool = BusinessPool.initPool(serverConfig);
threadPool.setThreadFactory(new NamedThreadFactory("SEV-TRIPLE-BIZ-" + serverConfig.getPort(), serverConfig.isDaemon()));
threadPool.setRejectedExecutionHandler(new SofaRejectedExecutionHandler());
if (serverConfig.isPreStartCore()) {
// 初始化核心线程池
threadPool.prestartAllCoreThreads();
}
return threadPool;
}
Aggregations