Optimize class naming

pull/656/head
chen.ma 2 years ago
parent bb1db80d1f
commit 7ff63dddc2

@ -37,13 +37,13 @@ import java.util.concurrent.ExecutorService;
*/ */
@Slf4j @Slf4j
@RequiredArgsConstructor @RequiredArgsConstructor
public abstract class AbstractCoreThreadPoolDynamicRefresh implements ThreadPoolDynamicRefresh, InitializingBean { public abstract class AbstractConfigThreadPoolDynamicRefresh implements ThreadPoolDynamicRefresh, InitializingBean {
protected final BootstrapConfigProperties bootstrapConfigProperties; protected final BootstrapConfigProperties bootstrapConfigProperties;
protected final ExecutorService dynamicRefreshExecutorService = ThreadPoolBuilder.builder().singlePool("client.dynamic.refresh").build(); protected final ExecutorService dynamicRefreshExecutorService = ThreadPoolBuilder.builder().singlePool("client.dynamic.refresh").build();
public AbstractCoreThreadPoolDynamicRefresh() { public AbstractConfigThreadPoolDynamicRefresh() {
bootstrapConfigProperties = ApplicationContextHolder.getBean(BootstrapConfigProperties.class); bootstrapConfigProperties = ApplicationContextHolder.getBean(BootstrapConfigProperties.class);
} }
@ -59,7 +59,7 @@ public abstract class AbstractCoreThreadPoolDynamicRefresh implements ThreadPool
if (CollectionUtil.isNotEmpty(newValueChangeMap)) { if (CollectionUtil.isNotEmpty(newValueChangeMap)) {
Optional.ofNullable(configInfo).ifPresent(each -> each.putAll(newValueChangeMap)); Optional.ofNullable(configInfo).ifPresent(each -> each.putAll(newValueChangeMap));
} }
BootstrapConfigProperties bindableCoreProperties = BootstrapCorePropertiesBinderAdapt.bootstrapCorePropertiesBinder(configInfo, bootstrapConfigProperties); BootstrapConfigProperties bindableCoreProperties = BootstrapConfigPropertiesBinderAdapt.bootstrapCorePropertiesBinder(configInfo, bootstrapConfigProperties);
ApplicationContextHolder.getInstance().publishEvent(new Hippo4jConfigDynamicRefreshEvent(this, bindableCoreProperties)); ApplicationContextHolder.getInstance().publishEvent(new Hippo4jConfigDynamicRefreshEvent(this, bindableCoreProperties));
} catch (Exception ex) { } catch (Exception ex) {
log.error("Hippo-4J core dynamic refresh failed.", ex); log.error("Hippo-4J core dynamic refresh failed.", ex);

@ -34,7 +34,7 @@ import java.util.Map;
* Apollo refresher handler. * Apollo refresher handler.
*/ */
@Slf4j @Slf4j
public class ApolloRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { public class ApolloRefresherHandler extends AbstractConfigThreadPoolDynamicRefresh {
private static final String APOLLO_PROPERTY = "${spring.dynamic.thread-pool.apollo.namespace:application}"; private static final String APOLLO_PROPERTY = "${spring.dynamic.thread-pool.apollo.namespace:application}";

@ -38,7 +38,7 @@ import java.util.Map;
/** /**
* Bootstrap core properties binder adapt. * Bootstrap core properties binder adapt.
*/ */
public class BootstrapCorePropertiesBinderAdapt { public class BootstrapConfigPropertiesBinderAdapt {
/** /**
* Bootstrap core properties binder. * Bootstrap core properties binder.

@ -36,7 +36,7 @@ import java.util.Objects;
* @description: * @description:
*/ */
@Slf4j @Slf4j
public class EtcdRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { public class EtcdRefresherHandler extends AbstractConfigThreadPoolDynamicRefresh {
private Client client; private Client client;

@ -29,7 +29,7 @@ import java.util.concurrent.Executor;
* Nacos cloud refresher handler. * Nacos cloud refresher handler.
*/ */
@Slf4j @Slf4j
public class NacosCloudRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { public class NacosCloudRefresherHandler extends AbstractConfigThreadPoolDynamicRefresh {
private final NacosConfigManager nacosConfigManager; private final NacosConfigManager nacosConfigManager;

@ -30,7 +30,7 @@ import java.util.concurrent.Executor;
* Nacos refresher handler. * Nacos refresher handler.
*/ */
@Slf4j @Slf4j
public class NacosRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { public class NacosRefresherHandler extends AbstractConfigThreadPoolDynamicRefresh {
@NacosInjected @NacosInjected
private ConfigService configService; private ConfigService configService;

@ -39,7 +39,7 @@ import java.util.Map;
* Zookeeper refresher handler. * Zookeeper refresher handler.
*/ */
@Slf4j @Slf4j
public class ZookeeperRefresherHandler extends AbstractCoreThreadPoolDynamicRefresh { public class ZookeeperRefresherHandler extends AbstractConfigThreadPoolDynamicRefresh {
private CuratorFramework curatorFramework; private CuratorFramework curatorFramework;

Loading…
Cancel
Save