|
|
@ -256,14 +256,15 @@ public abstract class AbstractCoreThreadPoolDynamicRefresh implements ThreadPool
|
|
|
|
ExecutorProperties beforeProperties = GlobalCoreThreadPoolManage.getProperties(properties.getThreadPoolId());
|
|
|
|
ExecutorProperties beforeProperties = GlobalCoreThreadPoolManage.getProperties(properties.getThreadPoolId());
|
|
|
|
|
|
|
|
|
|
|
|
ThreadPoolExecutor executor = GlobalThreadPoolManage.getExecutorService(threadPoolId).getExecutor();
|
|
|
|
ThreadPoolExecutor executor = GlobalThreadPoolManage.getExecutorService(threadPoolId).getExecutor();
|
|
|
|
if (!Objects.equals(beforeProperties.getCorePoolSize(), properties.getCorePoolSize())) {
|
|
|
|
|
|
|
|
executor.setCorePoolSize(properties.getCorePoolSize());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Objects.equals(beforeProperties.getMaximumPoolSize(), properties.getMaximumPoolSize())) {
|
|
|
|
if (!Objects.equals(beforeProperties.getMaximumPoolSize(), properties.getMaximumPoolSize())) {
|
|
|
|
executor.setMaximumPoolSize(properties.getMaximumPoolSize());
|
|
|
|
executor.setMaximumPoolSize(properties.getMaximumPoolSize());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!Objects.equals(beforeProperties.getCorePoolSize(), properties.getCorePoolSize())) {
|
|
|
|
|
|
|
|
executor.setCorePoolSize(properties.getCorePoolSize());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (!Objects.equals(beforeProperties.getAllowCoreThreadTimeOut(), properties.getAllowCoreThreadTimeOut())) {
|
|
|
|
if (!Objects.equals(beforeProperties.getAllowCoreThreadTimeOut(), properties.getAllowCoreThreadTimeOut())) {
|
|
|
|
executor.allowCoreThreadTimeOut(properties.getAllowCoreThreadTimeOut());
|
|
|
|
executor.allowCoreThreadTimeOut(properties.getAllowCoreThreadTimeOut());
|
|
|
|
}
|
|
|
|
}
|
|
|
|