diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/bootstrap/ApplicationBootstrapListener.java b/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/bootstrap/ApplicationBootstrapListener.java index 1f6a2f375..cd519a2fb 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/bootstrap/ApplicationBootstrapListener.java +++ b/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/bootstrap/ApplicationBootstrapListener.java @@ -16,8 +16,6 @@ package com.jd.live.agent.core.bootstrap; import com.jd.live.agent.core.bootstrap.ApplicationListener.ApplicationListenerAdapter; -import com.jd.live.agent.core.config.ConfigCenter; -import com.jd.live.agent.core.config.Configurator; import com.jd.live.agent.core.event.AgentEvent; import com.jd.live.agent.core.event.Publisher; import com.jd.live.agent.core.extension.annotation.Extension; @@ -36,19 +34,6 @@ public class ApplicationBootstrapListener extends ApplicationListenerAdapter { @Inject(Publisher.SYSTEM) private Publisher publisher; - @Inject(value = ConfigCenter.COMPONENT_CONFIG_CENTER, component = true, nullable = true) - private ConfigCenter configCenter; - - @Override - public void onEnvironmentPrepared(ApplicationBootstrapContext context, ApplicationEnvironment environment) { - if (configCenter != null) { - Configurator configurator = configCenter.getConfigurator(); - if (configurator != null) { - environment.addFirst(new LivePropertySource(configurator)); - } - } - } - @Override public void onStarted(ApplicationContext context) { publisher.offer(AgentEvent.onApplicationStarted("Application is started")); @@ -64,23 +49,4 @@ public void onStop(ApplicationContext context) { publisher.offer(AgentEvent.onApplicationStop("Application is stopping")); } - private static class LivePropertySource implements ApplicationPropertySource { - - private final Configurator configurator; - - LivePropertySource(Configurator configurator) { - this.configurator = configurator; - } - - @Override - public String getProperty(String name) { - Object property = configurator.getProperty(name); - return property == null ? null : property.toString(); - } - - @Override - public String getName() { - return configurator.getName(); - } - } } diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ServiceSupervisorAware.java b/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ServiceSupervisorAware.java new file mode 100644 index 000000000..0fcbd175b --- /dev/null +++ b/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ServiceSupervisorAware.java @@ -0,0 +1,31 @@ +/* + * Copyright © ${year} ${owner} (${email}) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jd.live.agent.core.service; + +/** + * An interface that allows a service to be aware of and interact with its supervisor. + */ +public interface ServiceSupervisorAware { + + /** + * Sets the service supervisor for this service. + * + * @param serviceSupervisor The service supervisor to be set. + */ + void setup(ServiceSupervisor serviceSupervisor); + +} + diff --git a/joylive-core/joylive-core-framework/src/main/java/com/jd/live/agent/core/bootstrap/Bootstrap.java b/joylive-core/joylive-core-framework/src/main/java/com/jd/live/agent/core/bootstrap/Bootstrap.java index 29784c3f3..83e0d787e 100644 --- a/joylive-core/joylive-core-framework/src/main/java/com/jd/live/agent/core/bootstrap/Bootstrap.java +++ b/joylive-core/joylive-core-framework/src/main/java/com/jd/live/agent/core/bootstrap/Bootstrap.java @@ -58,9 +58,9 @@ import com.jd.live.agent.core.parser.ObjectParser; import com.jd.live.agent.core.plugin.PluginManager; import com.jd.live.agent.core.plugin.PluginSupervisor; -import com.jd.live.agent.core.service.PolicyService; import com.jd.live.agent.core.service.ServiceManager; import com.jd.live.agent.core.service.ServiceSupervisor; +import com.jd.live.agent.core.service.ServiceSupervisorAware; import com.jd.live.agent.core.util.Close; import com.jd.live.agent.core.util.network.Ipv4; import com.jd.live.agent.core.util.option.CascadeOption; @@ -84,7 +84,6 @@ import java.util.*; import java.util.concurrent.Callable; import java.util.concurrent.CopyOnWriteArrayList; -import java.util.concurrent.atomic.AtomicReference; import static com.jd.live.agent.core.extension.condition.ConditionMatcher.DEPEND_ON_LOADER; @@ -182,12 +181,8 @@ public class Bootstrap implements AgentLifecycle { */ private ServiceManager serviceManager; - private ConfigCenter configCenter; - private ApplicationListener applicationListener; - private PolicyWatcherSupervisor policyWatcherSupervisor; - /** * Supervises plugins, handling their lifecycle. */ @@ -278,12 +273,10 @@ public void install() { //depend on agentConfig throw new InitializeException("the jvm version is not supported enhancement."); } - policyWatcherSupervisor = createPolicyWatcherSupervisor(); - createSourceSuppliers(); // depend on configWatcher + createSourceSuppliers(); serviceManager = createServiceManager(); //depend on extensionManager & classLoaderManager & eventBus & sourceSuppliers - addPolicyWatcher(); // depend on serviceManager & configSupervisor - configCenter = createConfigCenter(); - applicationListener = new ApplicationListenerWrapper(createApplicationListeners()); + setupServiceManager(); // inject to source supplier + applicationListener = new ApplicationListenerWrapper(createApplicationListeners()); // depend on source suppliers & serviceManager byteSupplier = createByteSupplier(); pluginManager = createPluginManager(); //depend on context & extensionManager & classLoaderManager & byteSupplier commandManager = createCommandManager(); @@ -545,8 +538,6 @@ private Injector createInjector() { ctx.add(ExtensionManager.COMPONENT_EXTENSION_MANAGER, extensionManager); ctx.add(ServiceSupervisor.COMPONENT_SERVICE_SUPERVISOR, serviceManager); ctx.add(ApplicationListener.COMPONENT_APPLICATION_LISTENER, applicationListener); - ctx.add(ConfigCenter.COMPONENT_CONFIG_CENTER, configCenter); - ctx.add(PolicyWatcherSupervisor.COMPONENT_CONFIG_SUPERVISOR, policyWatcherSupervisor); ctx.add(Timer.COMPONENT_TIMER, timer); ctx.add(EventBus.COMPONENT_EVENT_BUS, eventBus); ctx.add(Resourcer.COMPONENT_RESOURCER, classLoaderManager == null ? null : classLoaderManager.getPluginLoaders()); @@ -576,32 +567,18 @@ private ServiceManager createServiceManager() { return result; } - private PolicyWatcherManager createPolicyWatcherSupervisor() { - return new PolicyWatcherManager(); - } - - private void addPolicyWatcher() { - serviceManager.service(service -> { - if (service instanceof PolicyService) { - policyWatcherSupervisor.addWatcher((PolicyService) service); + private void setupServiceManager() { + for (InjectSourceSupplier supplier : sourceSuppliers) { + if (supplier instanceof ServiceSupervisorAware) { + ((ServiceSupervisorAware) supplier).setup(serviceManager); } - }); + } } private List createApplicationListeners() { return extensionManager.getOrLoadExtensible(ApplicationListener.class, classLoaderManager.getCoreImplLoader()).getExtensions(); } - private ConfigCenter createConfigCenter() { - AtomicReference result = new AtomicReference<>(); - serviceManager.service(service -> { - if (service instanceof ConfigCenter) { - result.set((ConfigCenter) service); - } - }); - return result.get(); - } - private PluginSupervisor createPluginManager() { return new PluginManager(instrumentation, agentConfig.getPluginConfig(), agentPath, extensionManager, classLoaderManager.getPluginLoaders(), byteSupplier, conditionMatcher); diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/ConfigPreparation.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/ConfigPreparation.java new file mode 100644 index 000000000..e9a0a492e --- /dev/null +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/ConfigPreparation.java @@ -0,0 +1,70 @@ +/* + * Copyright © ${year} ${owner} (${email}) + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.jd.live.agent.governance.bootstrap; + +import com.jd.live.agent.core.bootstrap.ApplicationBootstrapContext; +import com.jd.live.agent.core.bootstrap.ApplicationEnvironment; +import com.jd.live.agent.core.bootstrap.ApplicationListener; +import com.jd.live.agent.core.bootstrap.ApplicationListener.ApplicationListenerAdapter; +import com.jd.live.agent.core.bootstrap.ApplicationPropertySource; +import com.jd.live.agent.core.extension.annotation.Extension; +import com.jd.live.agent.core.inject.annotation.Inject; +import com.jd.live.agent.core.inject.annotation.Injectable; +import com.jd.live.agent.governance.subscription.config.ConfigCenter; +import com.jd.live.agent.governance.subscription.config.Configurator; + +/** + * An extension that prepares config for the application. + * + * @since 1.6.0 + */ +@Injectable +@Extension(value = "ConfigPreparation", order = ApplicationListener.ORDER_BOOTSTRAP) +public class ConfigPreparation extends ApplicationListenerAdapter { + + @Inject(value = ConfigCenter.COMPONENT_CONFIG_CENTER, component = true, nullable = true) + private ConfigCenter configCenter; + + @Override + public void onEnvironmentPrepared(ApplicationBootstrapContext context, ApplicationEnvironment environment) { + if (configCenter != null) { + Configurator configurator = configCenter.getConfigurator(); + if (configurator != null) { + environment.addFirst(new LivePropertySource(configurator)); + } + } + } + + private static class LivePropertySource implements ApplicationPropertySource { + + private final Configurator configurator; + + LivePropertySource(Configurator configurator) { + this.configurator = configurator; + } + + @Override + public String getProperty(String name) { + Object property = configurator.getProperty(name); + return property == null ? null : property.toString(); + } + + @Override + public String getName() { + return configurator.getName(); + } + } +} diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/PolicyPreparation.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/PolicyPreparation.java index 1200d99e0..898f2c895 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/PolicyPreparation.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/bootstrap/PolicyPreparation.java @@ -39,4 +39,5 @@ public class PolicyPreparation extends ApplicationListenerAdapter { public void onStarted(ApplicationContext context) { policySupervisor.waitReady(); } + } diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/ConfigCenterConfig.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/ConfigCenterConfig.java index af2e843bb..a869b71db 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/ConfigCenterConfig.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/ConfigCenterConfig.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.governance.config; -import com.jd.live.agent.core.config.ConfigName; +import com.jd.live.agent.governance.subscription.config.ConfigName; import lombok.Getter; import lombok.Setter; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/SyncConfig.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/SyncConfig.java similarity index 98% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/SyncConfig.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/SyncConfig.java index 19be93a99..bc6490887 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/SyncConfig.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/config/SyncConfig.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.config; import lombok.Getter; import lombok.Setter; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/PolicyManager.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/PolicyManager.java index 2592cd3f3..609519d6f 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/PolicyManager.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/PolicyManager.java @@ -15,8 +15,6 @@ */ package com.jd.live.agent.governance.policy; -import com.jd.live.agent.core.config.PolicyWatcher; -import com.jd.live.agent.core.config.PolicyWatcherSupervisor; import com.jd.live.agent.core.event.AgentEvent; import com.jd.live.agent.core.event.AgentEvent.EventType; import com.jd.live.agent.core.event.Event; @@ -31,7 +29,8 @@ import com.jd.live.agent.core.instance.AppService; import com.jd.live.agent.core.instance.Application; import com.jd.live.agent.core.parser.ObjectParser; -import com.jd.live.agent.core.service.PolicyService; +import com.jd.live.agent.core.service.ServiceSupervisor; +import com.jd.live.agent.core.service.ServiceSupervisorAware; import com.jd.live.agent.core.util.Futures; import com.jd.live.agent.core.util.time.Timer; import com.jd.live.agent.governance.config.*; @@ -48,12 +47,17 @@ import com.jd.live.agent.governance.invoke.filter.RouteFilter; import com.jd.live.agent.governance.invoke.loadbalance.LoadBalancer; import com.jd.live.agent.governance.invoke.matcher.TagMatcher; -import com.jd.live.agent.governance.policy.listener.LaneSpaceListener; -import com.jd.live.agent.governance.policy.listener.LiveSpaceListener; -import com.jd.live.agent.governance.policy.listener.ServiceListener; import com.jd.live.agent.governance.policy.variable.UnitFunction; import com.jd.live.agent.governance.policy.variable.VariableFunction; import com.jd.live.agent.governance.policy.variable.VariableParser; +import com.jd.live.agent.governance.service.PolicyService; +import com.jd.live.agent.governance.subscription.config.ConfigCenter; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcherManager; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcherSupervisor; +import com.jd.live.agent.governance.subscription.policy.listener.LaneSpaceListener; +import com.jd.live.agent.governance.subscription.policy.listener.LiveSpaceListener; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceListener; import lombok.Getter; import java.util.*; @@ -61,7 +65,7 @@ import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicReference; -import static com.jd.live.agent.core.config.PolicyWatcher.*; +import static com.jd.live.agent.governance.subscription.policy.PolicyWatcher.*; /** * PolicyManager @@ -71,7 +75,7 @@ */ @Injectable @Extension(value = "PolicyManager", order = InjectSourceSupplier.ORDER_POLICY_MANAGER) -public class PolicyManager implements PolicySupervisor, InjectSourceSupplier, ExtensionInitializer, InvocationContext { +public class PolicyManager implements PolicySupervisor, InjectSourceSupplier, ExtensionInitializer, InvocationContext, ServiceSupervisorAware { private final AtomicReference policy = new AtomicReference<>(); @@ -93,9 +97,6 @@ public class PolicyManager implements PolicySupervisor, InjectSourceSupplier, Ex @Inject(Application.COMPONENT_APPLICATION) private Application application; - @Inject(PolicyWatcherSupervisor.COMPONENT_CONFIG_SUPERVISOR) - private PolicyWatcherSupervisor configSupervisor; - @Inject(ObjectParser.JSON) private ObjectParser objectParser; @@ -177,6 +178,10 @@ public class PolicyManager implements PolicySupervisor, InjectSourceSupplier, Ex private List serviceSyncers; + private ConfigCenter configCenter; + + private final PolicyWatcherSupervisor policyWatcherSupervisor = new PolicyWatcherManager(); + private final AtomicBoolean warmup = new AtomicBoolean(false); @Override @@ -232,6 +237,7 @@ public void apply(InjectSource source) { source.add(PolicySupervisor.COMPONENT_POLICY_SUPPLIER, this); source.add(InvocationContext.COMPONENT_INVOCATION_CONTEXT, this); source.add(Propagation.COMPONENT_PROPAGATION, propagation); + source.add(ConfigCenter.COMPONENT_CONFIG_CENTER, configCenter); if (governanceConfig != null) { source.add(GovernanceConfig.COMPONENT_GOVERNANCE_CONFIG, governanceConfig); source.add(ServiceConfig.COMPONENT_SERVICE_CONFIG, governanceConfig.getServiceConfig()); @@ -306,9 +312,21 @@ public void initialize() { } } }); - configSupervisor.addListener(TYPE_LIVE_SPACE, new LiveSpaceListener(this, objectParser)); - configSupervisor.addListener(TYPE_LANE_SPACE, new LaneSpaceListener(this, objectParser)); - configSupervisor.addListener(TYPE_SERVICE_SPACE, new ServiceListener(this, objectParser, policyPublisher)); + + policyWatcherSupervisor.addListener(TYPE_LIVE_SPACE, new LiveSpaceListener(this, objectParser)); + policyWatcherSupervisor.addListener(TYPE_LANE_SPACE, new LaneSpaceListener(this, objectParser)); + policyWatcherSupervisor.addListener(TYPE_SERVICE_SPACE, new ServiceListener(this, objectParser, policyPublisher)); + } + + @Override + public void setup(ServiceSupervisor serviceSupervisor) { + serviceSupervisor.service(service -> { + if (service instanceof PolicyService) { + policyWatcherSupervisor.addWatcher((PolicyService) service); + } else if (service instanceof ConfigCenter) { + configCenter = (ConfigCenter) service; + } + }); } /** @@ -351,7 +369,7 @@ private Propagation buildPropagation() { */ private List getServiceSyncers() { List result = new ArrayList<>(); - List watchers = configSupervisor.getWatchers(); + List watchers = policyWatcherSupervisor.getWatchers(); if (watchers != null) { for (PolicyWatcher service : watchers) { if (service instanceof PolicyService) { diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/AbstractPolicyService.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/AbstractPolicyService.java similarity index 80% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/AbstractPolicyService.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/AbstractPolicyService.java index 236a4dba4..14ec9e1e5 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/AbstractPolicyService.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/AbstractPolicyService.java @@ -1,7 +1,8 @@ -package com.jd.live.agent.core.service; +package com.jd.live.agent.governance.service; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyListener; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyListener; +import com.jd.live.agent.core.service.AbstractService; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ConfigService.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/ConfigService.java similarity index 82% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ConfigService.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/ConfigService.java index af4b3508a..3363a07ca 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/ConfigService.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/ConfigService.java @@ -13,9 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.service; +package com.jd.live.agent.governance.service; -import com.jd.live.agent.core.config.ConfigCenter; +import com.jd.live.agent.governance.subscription.config.ConfigCenter; +import com.jd.live.agent.core.service.AgentService; /** * An interface for a configuration service that extends the AgentService interface and implements the ConfigCenter interface. diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/PolicyService.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/PolicyService.java similarity index 85% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/PolicyService.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/PolicyService.java index bcdbea2d4..84b11fda2 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/service/PolicyService.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/PolicyService.java @@ -13,9 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.service; +package com.jd.live.agent.governance.service; -import com.jd.live.agent.core.config.PolicyWatcher; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; +import com.jd.live.agent.core.service.AgentService; /** * An interface for a configuration service that extends the AgentService interface and implements the ConfigWatcher interface. diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLaneSpaceSyncer.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLaneSpaceSyncer.java index dc114ba2d..d643c6f17 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLaneSpaceSyncer.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLaneSpaceSyncer.java @@ -15,9 +15,9 @@ */ package com.jd.live.agent.governance.service.sync; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyEvent.EventType; -import com.jd.live.agent.core.config.PolicyWatcher; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent.EventType; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; import com.jd.live.agent.core.exception.SyncException; import com.jd.live.agent.core.instance.Location; import com.jd.live.agent.core.parser.TypeReference; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLiveSpaceSyncer.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLiveSpaceSyncer.java index 5b4d36d61..eb41668c2 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLiveSpaceSyncer.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractLiveSpaceSyncer.java @@ -15,9 +15,9 @@ */ package com.jd.live.agent.governance.service.sync; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyEvent.EventType; -import com.jd.live.agent.core.config.PolicyWatcher; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent.EventType; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; import com.jd.live.agent.core.exception.SyncException; import com.jd.live.agent.core.instance.Location; import com.jd.live.agent.core.parser.TypeReference; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractServiceSyncer.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractServiceSyncer.java index a68eef275..247fff567 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractServiceSyncer.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractServiceSyncer.java @@ -17,23 +17,23 @@ import com.jd.live.agent.bootstrap.logger.Logger; import com.jd.live.agent.bootstrap.logger.LoggerFactory; -import com.jd.live.agent.core.config.PolicyEvent.EventType; -import com.jd.live.agent.core.config.PolicyListener; -import com.jd.live.agent.core.config.PolicyWatcher; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent.EventType; +import com.jd.live.agent.governance.subscription.policy.PolicyListener; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.event.Event; import com.jd.live.agent.core.event.EventHandler; import com.jd.live.agent.core.event.Publisher; import com.jd.live.agent.core.exception.SyncException; import com.jd.live.agent.core.inject.annotation.Inject; -import com.jd.live.agent.core.service.PolicyService; +import com.jd.live.agent.governance.service.PolicyService; import com.jd.live.agent.core.thread.NamedThreadFactory; import com.jd.live.agent.core.util.Close; import com.jd.live.agent.core.util.Waiter; import com.jd.live.agent.core.util.template.Template; import com.jd.live.agent.governance.policy.PolicySubscriber; import com.jd.live.agent.governance.policy.PolicySupervisor; -import com.jd.live.agent.governance.policy.listener.ServiceEvent; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceEvent; import com.jd.live.agent.governance.policy.service.Service; import com.jd.live.agent.governance.service.sync.SyncAddress.ServiceAddress; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractSyncer.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractSyncer.java index fdd1b15dd..8f0e7f53b 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractSyncer.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/AbstractSyncer.java @@ -1,10 +1,10 @@ package com.jd.live.agent.governance.service.sync; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.inject.annotation.Inject; import com.jd.live.agent.core.instance.Application; import com.jd.live.agent.core.parser.ObjectParser; -import com.jd.live.agent.core.service.AbstractPolicyService; +import com.jd.live.agent.governance.service.AbstractPolicyService; import com.jd.live.agent.core.util.Close; import com.jd.live.agent.core.util.Futures; import com.jd.live.agent.core.util.template.Template; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/AbstractFileSyncer.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/AbstractFileSyncer.java index f022871d9..693748c73 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/AbstractFileSyncer.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/AbstractFileSyncer.java @@ -17,8 +17,8 @@ import com.jd.live.agent.bootstrap.logger.Logger; import com.jd.live.agent.bootstrap.logger.LoggerFactory; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyEvent.EventType; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent.EventType; import com.jd.live.agent.core.event.FileEvent; import com.jd.live.agent.core.event.Publisher; import com.jd.live.agent.core.inject.annotation.Inject; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/FileWatcher.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/FileWatcher.java index 3ac8d0bae..545023342 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/FileWatcher.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/file/FileWatcher.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.governance.service.sync.file; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.event.Event; import com.jd.live.agent.core.event.EventHandler; import com.jd.live.agent.core.event.FileEvent; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/AbstractServiceHttpSyncer.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/AbstractServiceHttpSyncer.java index 39835efa3..3fa09dda9 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/AbstractServiceHttpSyncer.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/AbstractServiceHttpSyncer.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.governance.service.sync.http; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.inject.annotation.Inject; import com.jd.live.agent.core.parser.ObjectParser; import com.jd.live.agent.core.parser.TypeReference; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/HttpWatcher.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/HttpWatcher.java index 1f0b729ae..dda4a01e5 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/HttpWatcher.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/service/sync/http/HttpWatcher.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.governance.service.sync.http; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.instance.Application; import com.jd.live.agent.core.parser.ObjectReader.StringReader; import com.jd.live.agent.core.util.Close; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigCenter.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigCenter.java similarity index 95% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigCenter.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigCenter.java index 88bd17412..014e68eb7 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigCenter.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigCenter.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.config; /** * An interface for managing configurations. diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigEvent.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigEvent.java similarity index 97% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigEvent.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigEvent.java index 52c208de5..2ee348a45 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigEvent.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigEvent.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.config; import lombok.Builder; import lombok.Getter; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigListener.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigListener.java similarity index 94% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigListener.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigListener.java index 81b127a37..09ca2dfc1 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigListener.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigListener.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.config; /** * An interface for listening to configuration updates. diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigName.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigName.java similarity index 93% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigName.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigName.java index 1f1f2e4ef..c1d8fae7f 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/ConfigName.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/ConfigName.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.config; import lombok.Getter; import lombok.Setter; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/Configurator.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/Configurator.java similarity index 96% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/Configurator.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/Configurator.java index d6725af16..77fcd7d19 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/Configurator.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/config/Configurator.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.config; /** * An interface for retrieving configuration properties. diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyEvent.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyEvent.java similarity index 97% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyEvent.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyEvent.java index 10f4c1d04..35f7b340a 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyEvent.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyEvent.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.policy; import lombok.Builder; import lombok.Getter; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyListener.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyListener.java similarity index 94% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyListener.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyListener.java index c07136eeb..f04ca8840 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyListener.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyListener.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.policy; /** * An interface for listening to configuration updates. diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcher.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcher.java similarity index 96% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcher.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcher.java index ded307f88..8838aec04 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcher.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcher.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.policy; /** * An interface for watching and managing configuration updates. diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcherManager.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcherManager.java similarity index 96% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcherManager.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcherManager.java index e3ce2e408..d400146d2 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcherManager.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcherManager.java @@ -1,4 +1,4 @@ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.policy; import java.util.*; diff --git a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcherSupervisor.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcherSupervisor.java similarity index 71% rename from joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcherSupervisor.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcherSupervisor.java index 0a8c02993..a0a68ab34 100644 --- a/joylive-core/joylive-core-api/src/main/java/com/jd/live/agent/core/config/PolicyWatcherSupervisor.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/PolicyWatcherSupervisor.java @@ -1,4 +1,4 @@ -package com.jd.live.agent.core.config; +package com.jd.live.agent.governance.subscription.policy; import java.util.List; @@ -7,11 +7,6 @@ */ public interface PolicyWatcherSupervisor extends PolicyWatcher { - /** - * A constant representing the component name for the configuration watcher. - */ - String COMPONENT_CONFIG_SUPERVISOR = "configSupervisor"; - /** * Adds a watcher to the list of watchers. * diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/AbstractListener.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/AbstractListener.java similarity index 97% rename from joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/AbstractListener.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/AbstractListener.java index e7fb387bc..f70148a01 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/AbstractListener.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/AbstractListener.java @@ -13,12 +13,12 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.governance.policy.listener; +package com.jd.live.agent.governance.subscription.policy.listener; import com.jd.live.agent.bootstrap.logger.Logger; import com.jd.live.agent.bootstrap.logger.LoggerFactory; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyListener; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyListener; import com.jd.live.agent.core.parser.ObjectParser; import com.jd.live.agent.core.parser.TypeReference; import com.jd.live.agent.governance.policy.GovernancePolicy; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/LaneSpaceListener.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/LaneSpaceListener.java similarity index 94% rename from joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/LaneSpaceListener.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/LaneSpaceListener.java index 256080aeb..1c3f8666e 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/LaneSpaceListener.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/LaneSpaceListener.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.governance.policy.listener; +package com.jd.live.agent.governance.subscription.policy.listener; -import com.jd.live.agent.core.config.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; import com.jd.live.agent.core.parser.ObjectParser; import com.jd.live.agent.governance.policy.GovernancePolicy; import com.jd.live.agent.governance.policy.PolicySupervisor; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/LiveSpaceListener.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/LiveSpaceListener.java similarity index 94% rename from joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/LiveSpaceListener.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/LiveSpaceListener.java index 79e83a1ed..c971adc37 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/LiveSpaceListener.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/LiveSpaceListener.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.governance.policy.listener; +package com.jd.live.agent.governance.subscription.policy.listener; -import com.jd.live.agent.core.config.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; import com.jd.live.agent.core.parser.ObjectParser; import com.jd.live.agent.governance.policy.GovernancePolicy; import com.jd.live.agent.governance.policy.PolicySupervisor; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/ServiceEvent.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/ServiceEvent.java similarity index 90% rename from joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/ServiceEvent.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/ServiceEvent.java index 0599d5840..c04ae3607 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/ServiceEvent.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/ServiceEvent.java @@ -13,9 +13,9 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.governance.policy.listener; +package com.jd.live.agent.governance.subscription.policy.listener; -import com.jd.live.agent.core.config.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; import com.jd.live.agent.governance.policy.service.MergePolicy; import lombok.Builder; import lombok.Getter; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/ServiceListener.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/ServiceListener.java similarity index 95% rename from joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/ServiceListener.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/ServiceListener.java index bc7b68fa3..6227cdee6 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/ServiceListener.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/ServiceListener.java @@ -13,11 +13,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.governance.policy.listener; +package com.jd.live.agent.governance.subscription.policy.listener; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyEvent.EventType; -import com.jd.live.agent.core.config.PolicyWatcher; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent.EventType; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; import com.jd.live.agent.core.event.Event; import com.jd.live.agent.core.event.Publisher; import com.jd.live.agent.core.parser.ObjectParser; diff --git a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/UpdateResult.java b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/UpdateResult.java similarity index 90% rename from joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/UpdateResult.java rename to joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/UpdateResult.java index 4f53773ba..6234ca8bb 100644 --- a/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/policy/listener/UpdateResult.java +++ b/joylive-core/joylive-governance-api/src/main/java/com/jd/live/agent/governance/subscription/policy/listener/UpdateResult.java @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -package com.jd.live.agent.governance.policy.listener; +package com.jd.live.agent.governance.subscription.policy.listener; public class UpdateResult { diff --git a/joylive-core/joylive-governance-api/src/main/resources/META-INF/services/com.jd.live.agent.core.bootstrap.ApplicationListener b/joylive-core/joylive-governance-api/src/main/resources/META-INF/services/com.jd.live.agent.core.bootstrap.ApplicationListener index 3d2ee3f4c..1bb004d3e 100644 --- a/joylive-core/joylive-governance-api/src/main/resources/META-INF/services/com.jd.live.agent.core.bootstrap.ApplicationListener +++ b/joylive-core/joylive-governance-api/src/main/resources/META-INF/services/com.jd.live.agent.core.bootstrap.ApplicationListener @@ -1 +1,2 @@ +com.jd.live.agent.governance.bootstrap.ConfigPreparation com.jd.live.agent.governance.bootstrap.PolicyPreparation \ No newline at end of file diff --git a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LaneSpaceFileSyncer.java b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LaneSpaceFileSyncer.java index 40acf414e..00f2e2806 100644 --- a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LaneSpaceFileSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LaneSpaceFileSyncer.java @@ -15,8 +15,8 @@ */ package com.jd.live.agent.implement.service.policy.file; -import com.jd.live.agent.core.config.PolicyWatcher; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; diff --git a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LiveSpaceFileSyncer.java b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LiveSpaceFileSyncer.java index 815020762..21bae9c90 100644 --- a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LiveSpaceFileSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/LiveSpaceFileSyncer.java @@ -15,8 +15,8 @@ */ package com.jd.live.agent.implement.service.policy.file; -import com.jd.live.agent.core.config.PolicyWatcher; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; diff --git a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/ServiceFileSyncer.java b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/ServiceFileSyncer.java index 5d7b68f80..ecae20f86 100644 --- a/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/ServiceFileSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-file/src/main/java/com/jd/live/agent/implement/service/policy/file/ServiceFileSyncer.java @@ -15,16 +15,16 @@ */ package com.jd.live.agent.implement.service.policy.file; -import com.jd.live.agent.core.config.PolicyEvent; -import com.jd.live.agent.core.config.PolicyEvent.EventType; -import com.jd.live.agent.core.config.PolicyWatcher; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent; +import com.jd.live.agent.governance.subscription.policy.PolicyEvent.EventType; +import com.jd.live.agent.governance.subscription.policy.PolicyWatcher; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; import com.jd.live.agent.core.inject.annotation.Injectable; import com.jd.live.agent.core.parser.TypeReference; -import com.jd.live.agent.governance.policy.listener.ServiceEvent; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceEvent; import com.jd.live.agent.governance.policy.service.MergePolicy; import com.jd.live.agent.governance.policy.service.Service; import com.jd.live.agent.governance.service.sync.SyncKey.FileKey; diff --git a/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/LaneSpaceHttpSyncer.java b/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/LaneSpaceHttpSyncer.java index 70a26cd4c..4054d2e4b 100644 --- a/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/LaneSpaceHttpSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/LaneSpaceHttpSyncer.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.implement.service.policy.microservice; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; diff --git a/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/ServiceHttpSyncer.java b/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/ServiceHttpSyncer.java index 3cc82c63c..5e3d0f986 100644 --- a/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/ServiceHttpSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/ServiceHttpSyncer.java @@ -15,14 +15,14 @@ */ package com.jd.live.agent.implement.service.policy.microservice; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; import com.jd.live.agent.core.inject.annotation.Injectable; import com.jd.live.agent.governance.config.GovernanceConfig; import com.jd.live.agent.governance.policy.PolicySubscriber; -import com.jd.live.agent.governance.policy.listener.ServiceEvent; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceEvent; import com.jd.live.agent.governance.policy.service.MergePolicy; import com.jd.live.agent.governance.service.sync.SyncKey.ServiceKey; import com.jd.live.agent.governance.service.sync.http.AbstractServiceHttpSyncer; diff --git a/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/config/MicroServiceSyncConfig.java b/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/config/MicroServiceSyncConfig.java index 3e138fcd7..30c735146 100644 --- a/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/config/MicroServiceSyncConfig.java +++ b/joylive-implement/joylive-service/joylive-service-microservice/src/main/java/com/jd/live/agent/implement/service/policy/microservice/config/MicroServiceSyncConfig.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.implement.service.policy.microservice.config; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.governance.service.sync.SyncAddress.LaneSpaceAddress; import com.jd.live.agent.governance.service.sync.SyncAddress.ServiceAddress; import lombok.Setter; diff --git a/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveServiceHttpSyncer.java b/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveServiceHttpSyncer.java index 9af9b8bb8..2276866e0 100644 --- a/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveServiceHttpSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveServiceHttpSyncer.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.implement.service.policy.multilive; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; @@ -25,7 +25,7 @@ import com.jd.live.agent.core.util.http.HttpUtils; import com.jd.live.agent.governance.config.GovernanceConfig; import com.jd.live.agent.governance.policy.PolicySubscriber; -import com.jd.live.agent.governance.policy.listener.ServiceEvent; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceEvent; import com.jd.live.agent.governance.policy.service.MergePolicy; import com.jd.live.agent.governance.policy.service.Service; import com.jd.live.agent.governance.service.sync.SyncKey.ServiceKey; diff --git a/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveSpaceHttpSyncer.java b/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveSpaceHttpSyncer.java index c7051ca3a..1eccd8849 100644 --- a/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveSpaceHttpSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/LiveSpaceHttpSyncer.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.implement.service.policy.multilive; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; diff --git a/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/config/LiveSyncConfig.java b/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/config/LiveSyncConfig.java index 57f53a6c0..d01d84741 100644 --- a/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/config/LiveSyncConfig.java +++ b/joylive-implement/joylive-service/joylive-service-multilive/src/main/java/com/jd/live/agent/implement/service/policy/multilive/config/LiveSyncConfig.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.implement.service.policy.multilive.config; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.governance.service.sync.SyncAddress.LiveSpaceAddress; import com.jd.live.agent.governance.service.sync.SyncAddress.ServiceAddress; import lombok.Setter; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigService.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigService.java index a6c30947e..437ad3d2f 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigService.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigService.java @@ -15,15 +15,15 @@ */ package com.jd.live.agent.implement.service.config.nacos; -import com.jd.live.agent.core.config.ConfigName; -import com.jd.live.agent.core.config.Configurator; +import com.jd.live.agent.governance.subscription.config.ConfigName; +import com.jd.live.agent.governance.subscription.config.Configurator; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Inject; import com.jd.live.agent.core.inject.annotation.Injectable; import com.jd.live.agent.core.parser.ConfigParser; import com.jd.live.agent.core.service.AbstractService; -import com.jd.live.agent.core.service.ConfigService; +import com.jd.live.agent.governance.service.ConfigService; import com.jd.live.agent.core.util.Close; import com.jd.live.agent.core.util.Futures; import com.jd.live.agent.governance.annotation.ConditionalOnConfigCenterEnabled; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigurator.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigurator.java index b3178048e..2ace4be4b 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigurator.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/config/nacos/NacosConfigurator.java @@ -18,11 +18,11 @@ import com.alibaba.nacos.api.config.listener.Listener; import com.jd.live.agent.bootstrap.logger.Logger; import com.jd.live.agent.bootstrap.logger.LoggerFactory; -import com.jd.live.agent.core.config.ConfigEvent; -import com.jd.live.agent.core.config.ConfigEvent.EventType; -import com.jd.live.agent.core.config.ConfigListener; -import com.jd.live.agent.core.config.ConfigName; -import com.jd.live.agent.core.config.Configurator; +import com.jd.live.agent.governance.subscription.config.ConfigEvent; +import com.jd.live.agent.governance.subscription.config.ConfigEvent.EventType; +import com.jd.live.agent.governance.subscription.config.ConfigListener; +import com.jd.live.agent.governance.subscription.config.ConfigName; +import com.jd.live.agent.governance.subscription.config.Configurator; import com.jd.live.agent.core.parser.ConfigParser; import com.jd.live.agent.implement.service.config.nacos.client.NacosClientApi; import lombok.Getter; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LaneSpaceNacosSyncer.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LaneSpaceNacosSyncer.java index 34dc1acef..fd6e848e5 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LaneSpaceNacosSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LaneSpaceNacosSyncer.java @@ -16,7 +16,7 @@ package com.jd.live.agent.implement.service.policy.nacos; import com.alibaba.nacos.api.exception.NacosException; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveServiceNacosSyncer.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveServiceNacosSyncer.java index ca7791b38..87d6ba439 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveServiceNacosSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveServiceNacosSyncer.java @@ -16,7 +16,7 @@ package com.jd.live.agent.implement.service.policy.nacos; import com.alibaba.nacos.api.exception.NacosException; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; @@ -26,7 +26,7 @@ import com.jd.live.agent.core.util.template.Template; import com.jd.live.agent.governance.config.GovernanceConfig; import com.jd.live.agent.governance.policy.PolicySubscriber; -import com.jd.live.agent.governance.policy.listener.ServiceEvent; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceEvent; import com.jd.live.agent.governance.policy.service.MergePolicy; import com.jd.live.agent.governance.policy.service.Service; import com.jd.live.agent.governance.service.sync.AbstractServiceSyncer; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveSpaceNacosSyncer.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveSpaceNacosSyncer.java index d8591b076..eade2d8ad 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveSpaceNacosSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/LiveSpaceNacosSyncer.java @@ -16,7 +16,7 @@ package com.jd.live.agent.implement.service.policy.nacos; import com.alibaba.nacos.api.exception.NacosException; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/ServiceNacosSyncer.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/ServiceNacosSyncer.java index 7517ede6f..fb92ee954 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/ServiceNacosSyncer.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/ServiceNacosSyncer.java @@ -16,7 +16,7 @@ package com.jd.live.agent.implement.service.policy.nacos; import com.alibaba.nacos.api.exception.NacosException; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.core.extension.annotation.ConditionalOnProperty; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Config; @@ -26,7 +26,7 @@ import com.jd.live.agent.core.util.template.Template; import com.jd.live.agent.governance.config.GovernanceConfig; import com.jd.live.agent.governance.policy.PolicySubscriber; -import com.jd.live.agent.governance.policy.listener.ServiceEvent; +import com.jd.live.agent.governance.subscription.policy.listener.ServiceEvent; import com.jd.live.agent.governance.policy.service.MergePolicy; import com.jd.live.agent.governance.policy.service.Service; import com.jd.live.agent.governance.service.sync.AbstractServiceSyncer; diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosConfig.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosConfig.java index 07ee4b019..af00c7c57 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosConfig.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosConfig.java @@ -18,7 +18,7 @@ import lombok.Getter; import lombok.Setter; -import static com.jd.live.agent.core.config.SyncConfig.CONFIG_PREFIX; +import static com.jd.live.agent.governance.config.SyncConfig.CONFIG_PREFIX; /** * NacosSyncConfig is responsible for Nacos settings. diff --git a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosSyncConfig.java b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosSyncConfig.java index d6171e82f..5daf697eb 100644 --- a/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosSyncConfig.java +++ b/joylive-implement/joylive-service/joylive-service-nacos/src/main/java/com/jd/live/agent/implement/service/policy/nacos/config/NacosSyncConfig.java @@ -15,7 +15,7 @@ */ package com.jd.live.agent.implement.service.policy.nacos.config; -import com.jd.live.agent.core.config.SyncConfig; +import com.jd.live.agent.governance.config.SyncConfig; import com.jd.live.agent.implement.service.config.nacos.client.NacosProperties; import lombok.Getter; import lombok.Setter; diff --git a/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/definition/LoggerFactoryDefinition.java b/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/definition/LoggerFactoryDefinition.java index 77982b53c..1035ca01e 100644 --- a/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/definition/LoggerFactoryDefinition.java +++ b/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/definition/LoggerFactoryDefinition.java @@ -16,7 +16,7 @@ package com.jd.live.agent.plugin.system.slf4j.definition; import com.jd.live.agent.core.bytekit.matcher.MatcherBuilder; -import com.jd.live.agent.core.config.ConfigCenter; +import com.jd.live.agent.governance.subscription.config.ConfigCenter; import com.jd.live.agent.core.extension.annotation.ConditionalOnClass; import com.jd.live.agent.core.extension.annotation.Extension; import com.jd.live.agent.core.inject.annotation.Inject; diff --git a/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/interceptor/LoggerFactoryInterceptor.java b/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/interceptor/LoggerFactoryInterceptor.java index 7b78cf455..7186521fc 100644 --- a/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/interceptor/LoggerFactoryInterceptor.java +++ b/joylive-plugin/joylive-system/joylive-system-slf4j/src/main/java/com/jd/live/agent/plugin/system/slf4j/interceptor/LoggerFactoryInterceptor.java @@ -19,10 +19,10 @@ import com.jd.live.agent.bootstrap.bytekit.context.MethodContext; import com.jd.live.agent.bootstrap.logger.Logger; import com.jd.live.agent.bootstrap.logger.LoggerFactory; -import com.jd.live.agent.core.config.ConfigCenter; -import com.jd.live.agent.core.config.ConfigEvent; -import com.jd.live.agent.core.config.ConfigEvent.EventType; -import com.jd.live.agent.core.config.Configurator; +import com.jd.live.agent.governance.subscription.config.ConfigCenter; +import com.jd.live.agent.governance.subscription.config.ConfigEvent; +import com.jd.live.agent.governance.subscription.config.ConfigEvent.EventType; +import com.jd.live.agent.governance.subscription.config.Configurator; import com.jd.live.agent.core.plugin.definition.InterceptorAdaptor; import com.jd.live.agent.governance.config.ConfigCenterConfig; import com.jd.live.agent.governance.config.GovernanceConfig;