This is an automated email from the ASF dual-hosted git repository.
duanzhengqiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push:
new fdbf950 Add service.config and state package (#10406)
fdbf950 is described below
commit fdbf950b86d916a2de942a4034bd8f51a9f21d1d
Author: Liang Zhang <[email protected]>
AuthorDate: Thu May 20 21:07:25 2021 +0800
Add service.config and state package (#10406)
* Add service.config package
* Add service.state package
---
.../governance/core/registry/RegistryCenter.java | 10 +++++-----
.../registry/service/{ => config}/GlobalRegistryService.java | 2 +-
.../service/{ => config}/SchemaBasedRegistryService.java | 2 +-
.../service/{ => config}/impl/DataSourceRegistryService.java | 4 ++--
.../service/{ => config}/impl/GlobalRuleRegistryService.java | 4 ++--
.../service/{ => config}/impl/PropertiesRegistryService.java | 4 ++--
.../service/{ => config}/impl/SchemaRuleRegistryService.java | 4 ++--
.../registry/service/{impl => state}/LockRegistryService.java | 2 +-
.../governance/core/lock/GovernanceLockTest.java | 2 +-
.../{ => config}/impl/DataSourceRegistryServiceTest.java | 2 +-
.../{ => config}/impl/GlobalRuleRegistryServiceTest.java | 2 +-
.../{ => config}/impl/PropertiesRegistryServiceTest.java | 2 +-
.../{ => config}/impl/SchemaRuleRegistryServiceTest.java | 2 +-
.../service/{impl => state}/LockRegistryServiceTest.java | 2 +-
14 files changed, 22 insertions(+), 22 deletions(-)
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
index 78d783e..6b38bd3 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/RegistryCenter.java
@@ -38,11 +38,11 @@ import
org.apache.shardingsphere.governance.core.registry.listener.event.rule.Ru
import
org.apache.shardingsphere.governance.core.registry.listener.event.rule.RuleConfigurationsAlteredEvent;
import
org.apache.shardingsphere.governance.core.registry.listener.event.rule.SwitchRuleConfigurationEvent;
import
org.apache.shardingsphere.governance.core.registry.listener.event.scaling.StartScalingEvent;
-import
org.apache.shardingsphere.governance.core.registry.service.impl.DataSourceRegistryService;
-import
org.apache.shardingsphere.governance.core.registry.service.impl.GlobalRuleRegistryService;
-import
org.apache.shardingsphere.governance.core.registry.service.impl.LockRegistryService;
-import
org.apache.shardingsphere.governance.core.registry.service.impl.PropertiesRegistryService;
-import
org.apache.shardingsphere.governance.core.registry.service.impl.SchemaRuleRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.impl.DataSourceRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.impl.GlobalRuleRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.state.LockRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.impl.PropertiesRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.impl.SchemaRuleRegistryService;
import org.apache.shardingsphere.governance.core.yaml.schema.pojo.YamlSchema;
import
org.apache.shardingsphere.governance.core.yaml.schema.swapper.SchemaYamlSwapper;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/GlobalRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/GlobalRegistryService.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/GlobalRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/GlobalRegistryService.java
index 0cfc83b..00a3e5c 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/GlobalRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/GlobalRegistryService.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service;
+package org.apache.shardingsphere.governance.core.registry.service.config;
/**
* Global registry service.
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/SchemaBasedRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/SchemaBasedRegistryService.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/SchemaBasedRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/SchemaBasedRegistryService.java
index efa53f8..e30858a 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/SchemaBasedRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/SchemaBasedRegistryService.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service;
+package org.apache.shardingsphere.governance.core.registry.service.config;
/**
* Schema based registry service.
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/DataSourceRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/DataSourceRegistryService.java
similarity index 98%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/DataSourceRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/DataSourceRegistryService.java
index dc8b01f..e5bfe6f 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/DataSourceRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/DataSourceRegistryService.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.governance.core.registry.RegistryCenterNode;
-import
org.apache.shardingsphere.governance.core.registry.service.SchemaBasedRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.SchemaBasedRegistryService;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import
org.apache.shardingsphere.infra.config.datasource.DataSourceConfiguration;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/GlobalRuleRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/GlobalRuleRegistryService.java
similarity index 98%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/GlobalRuleRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/GlobalRuleRegistryService.java
index 5099db8..09d7bdc 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/GlobalRuleRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/GlobalRuleRegistryService.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.governance.core.registry.RegistryCenterNode;
-import
org.apache.shardingsphere.governance.core.registry.service.GlobalRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.GlobalRegistryService;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/PropertiesRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/PropertiesRegistryService.java
similarity index 97%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/PropertiesRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/PropertiesRegistryService.java
index 4e5e82d..8ee605d 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/PropertiesRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/PropertiesRegistryService.java
@@ -15,12 +15,12 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.governance.core.registry.RegistryCenterNode;
-import
org.apache.shardingsphere.governance.core.registry.service.GlobalRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.GlobalRegistryService;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import org.apache.shardingsphere.infra.yaml.engine.YamlEngine;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/SchemaRuleRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/SchemaRuleRegistryService.java
similarity index 98%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/SchemaRuleRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/SchemaRuleRegistryService.java
index 0f7da56..88ba489 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/SchemaRuleRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/SchemaRuleRegistryService.java
@@ -15,14 +15,14 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
import org.apache.shardingsphere.governance.core.registry.RegistryCenterNode;
import
org.apache.shardingsphere.governance.core.registry.checker.RuleConfigurationChecker;
import
org.apache.shardingsphere.governance.core.registry.checker.RuleConfigurationCheckerFactory;
-import
org.apache.shardingsphere.governance.core.registry.service.SchemaBasedRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.config.SchemaBasedRegistryService;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.infra.yaml.config.YamlRuleConfiguration;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/LockRegistryService.java
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/state/LockRegistryService.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/LockRegistryService.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/state/LockRegistryService.java
index fd78b39..1c9e4d9 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/impl/LockRegistryService.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/main/java/org/apache/shardingsphere/governance/core/registry/service/state/LockRegistryService.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.state;
import com.google.common.base.Joiner;
import com.google.common.base.Strings;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/lock/GovernanceLockTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/lock/GovernanceLockTest.java
index 27f5d70..539b437 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/lock/GovernanceLockTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/lock/GovernanceLockTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.governance.core.lock;
import org.apache.shardingsphere.governance.core.registry.RegistryCenter;
-import
org.apache.shardingsphere.governance.core.registry.service.impl.LockRegistryService;
+import
org.apache.shardingsphere.governance.core.registry.service.state.LockRegistryService;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/DataSourceRegistryServiceTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/DataSourceRegistryServiceTest.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/DataSourceRegistryServiceTest.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/DataSourceRegistryServiceTest.java
index 8cb2334..ee8c2e5 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/DataSourceRegistryServiceTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/DataSourceRegistryServiceTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import lombok.SneakyThrows;
import org.apache.shardingsphere.governance.core.registry.MockDataSource;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/GlobalRuleRegistryServiceTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/GlobalRuleRegistryServiceTest.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/GlobalRuleRegistryServiceTest.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/GlobalRuleRegistryServiceTest.java
index e7acda8..a261712 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/GlobalRuleRegistryServiceTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/GlobalRuleRegistryServiceTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import lombok.SneakyThrows;
import
org.apache.shardingsphere.authority.api.config.AuthorityRuleConfiguration;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/PropertiesRegistryServiceTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/PropertiesRegistryServiceTest.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/PropertiesRegistryServiceTest.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/PropertiesRegistryServiceTest.java
index eaa9888..c452ddc 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/PropertiesRegistryServiceTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/PropertiesRegistryServiceTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;
import
org.apache.shardingsphere.infra.config.properties.ConfigurationPropertyKey;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/SchemaRuleRegistryServiceTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/SchemaRuleRegistryServiceTest.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/SchemaRuleRegistryServiceTest.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/SchemaRuleRegistryServiceTest.java
index efc2ca9..f24ab66 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/SchemaRuleRegistryServiceTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/config/impl/SchemaRuleRegistryServiceTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.config.impl;
import lombok.SneakyThrows;
import
org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
diff --git
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/LockRegistryServiceTest.java
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/state/LockRegistryServiceTest.java
similarity index 99%
rename from
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/LockRegistryServiceTest.java
rename to
shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/state/LockRegistryServiceTest.java
index f3672c3..85cc0d8 100644
---
a/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/impl/LockRegistryServiceTest.java
+++
b/shardingsphere-governance/shardingsphere-governance-core/src/test/java/org/apache/shardingsphere/governance/core/registry/service/state/LockRegistryServiceTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.governance.core.registry.service.impl;
+package org.apache.shardingsphere.governance.core.registry.service.state;
import org.apache.shardingsphere.governance.core.lock.node.LockNode;
import
org.apache.shardingsphere.governance.repository.spi.RegistryCenterRepository;