Change thread pool id naming

pull/218/head
chen.ma 3 years ago
parent 8d00d6e839
commit e1177805fc

@ -102,7 +102,7 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor {
* @param dynamicThreadPoolWrap * @param dynamicThreadPoolWrap
*/ */
protected ThreadPoolExecutor fillPoolAndRegister(DynamicThreadPoolWrapper dynamicThreadPoolWrap) { protected ThreadPoolExecutor fillPoolAndRegister(DynamicThreadPoolWrapper dynamicThreadPoolWrap) {
String threadPoolId = dynamicThreadPoolWrap.getTpId(); String threadPoolId = dynamicThreadPoolWrap.getThreadPoolId();
ThreadPoolExecutor newDynamicPoolExecutor = dynamicThreadPoolWrap.getExecutor(); ThreadPoolExecutor newDynamicPoolExecutor = dynamicThreadPoolWrap.getExecutor();
ExecutorProperties executorProperties = null; ExecutorProperties executorProperties = null;
if (null != bootstrapCoreProperties.getExecutors()) { if (null != bootstrapCoreProperties.getExecutors()) {
@ -164,7 +164,7 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor {
dynamicThreadPoolWrap.setExecutor(newDynamicPoolExecutor); dynamicThreadPoolWrap.setExecutor(newDynamicPoolExecutor);
} }
GlobalThreadPoolManage.registerPool(dynamicThreadPoolWrap.getTpId(), dynamicThreadPoolWrap); GlobalThreadPoolManage.registerPool(dynamicThreadPoolWrap.getThreadPoolId(), dynamicThreadPoolWrap);
GlobalCoreThreadPoolManage.register( GlobalCoreThreadPoolManage.register(
threadPoolId, threadPoolId,
executorProperties == null executorProperties == null

@ -135,7 +135,7 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor {
* @param dynamicThreadPoolWrap * @param dynamicThreadPoolWrap
*/ */
protected ThreadPoolExecutor fillPoolAndRegister(DynamicThreadPoolWrapper dynamicThreadPoolWrap) { protected ThreadPoolExecutor fillPoolAndRegister(DynamicThreadPoolWrapper dynamicThreadPoolWrap) {
String tpId = dynamicThreadPoolWrap.getTpId(); String tpId = dynamicThreadPoolWrap.getThreadPoolId();
Map<String, String> queryStrMap = new HashMap(3); Map<String, String> queryStrMap = new HashMap(3);
queryStrMap.put(TP_ID, tpId); queryStrMap.put(TP_ID, tpId);
queryStrMap.put(ITEM_ID, properties.getItemId()); queryStrMap.put(ITEM_ID, properties.getItemId());
@ -201,7 +201,7 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor {
dynamicThreadPoolWrap.setSubscribeFlag(isSubscribe); dynamicThreadPoolWrap.setSubscribeFlag(isSubscribe);
} }
GlobalThreadPoolManage.register(dynamicThreadPoolWrap.getTpId(), ppi, dynamicThreadPoolWrap); GlobalThreadPoolManage.register(dynamicThreadPoolWrap.getThreadPoolId(), ppi, dynamicThreadPoolWrap);
return newDynamicPoolExecutor; return newDynamicPoolExecutor;
} }
@ -212,7 +212,7 @@ public final class DynamicThreadPoolPostProcessor implements BeanPostProcessor {
*/ */
protected void subscribeConfig(DynamicThreadPoolWrapper dynamicThreadPoolWrap) { protected void subscribeConfig(DynamicThreadPoolWrapper dynamicThreadPoolWrap) {
if (dynamicThreadPoolWrap.isSubscribeFlag()) { if (dynamicThreadPoolWrap.isSubscribeFlag()) {
threadPoolOperation.subscribeConfig(dynamicThreadPoolWrap.getTpId(), executorService, config -> threadPoolDynamicRefresh.dynamicRefresh(config)); threadPoolOperation.subscribeConfig(dynamicThreadPoolWrap.getThreadPoolId(), executorService, config -> threadPoolDynamicRefresh.dynamicRefresh(config));
} }
} }

Loading…
Cancel
Save