From b762b2c067c40f2238c600e55112b24b8d841772 Mon Sep 17 00:00:00 2001 From: zhangliang Date: Mon, 16 Dec 2024 17:56:02 +0800 Subject: [PATCH] Move AlgorithmChangedProcessor to algorithm-core module --- .../encrypt/rule/changed/EncryptorChangedProcessor.java | 2 +- .../mask/rule/changed/MaskAlgorithmChangedProcessor.java | 2 +- .../ReadwriteSplittingLoadBalancerChangedProcessor.java | 2 +- .../rule/changed/ShadowAlgorithmChangedProcessor.java | 2 +- .../sharding/rule/changed/KeyGeneratorChangedProcessor.java | 2 +- .../rule/changed/ShardingAlgorithmChangedProcessor.java | 2 +- .../rule/changed/ShardingAuditorChangedProcessor.java | 2 +- infra/algorithm/core/pom.xml | 2 +- .../core}/processor/AlgorithmChangedProcessor.java | 2 +- .../core}/processor/AlgorithmChangedProcessorTest.java | 6 +++--- .../fixture/AlgorithmChangedProcessorFixtureRule.java | 2 +- .../AlgorithmChangedProcessorFixtureRuleConfiguration.java | 2 +- .../processor/fixture/FixtureAlgorithmChangedProcessor.java | 4 ++-- ...ingsphere.mode.spi.RuleItemConfigurationChangedProcessor | 2 +- 14 files changed, 17 insertions(+), 17 deletions(-) rename {mode/core/src/main/java/org/apache/shardingsphere/mode => infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core}/processor/AlgorithmChangedProcessor.java (98%) rename {mode/core/src/test/java/org/apache/shardingsphere/mode => infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core}/processor/AlgorithmChangedProcessorTest.java (94%) rename {mode/core/src/test/java/org/apache/shardingsphere/mode => infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core}/processor/fixture/AlgorithmChangedProcessorFixtureRule.java (94%) rename {mode/core/src/test/java/org/apache/shardingsphere/mode => infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core}/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java (94%) rename {mode/core/src/test/java/org/apache/shardingsphere/mode => infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core}/processor/fixture/FixtureAlgorithmChangedProcessor.java (91%) rename {mode => infra/algorithm}/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor (88%) diff --git a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/changed/EncryptorChangedProcessor.java b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/changed/EncryptorChangedProcessor.java index e26d1a73bebb4..2ea8db819a39f 100644 --- a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/changed/EncryptorChangedProcessor.java +++ b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/rule/changed/EncryptorChangedProcessor.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.encrypt.metadata.nodepath.EncryptRuleNodePathProvider; import org.apache.shardingsphere.encrypt.rule.EncryptRule; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import java.util.LinkedHashMap; import java.util.LinkedList; diff --git a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/rule/changed/MaskAlgorithmChangedProcessor.java b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/rule/changed/MaskAlgorithmChangedProcessor.java index 0ab1137a895c9..7bded1264bd5a 100644 --- a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/rule/changed/MaskAlgorithmChangedProcessor.java +++ b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/rule/changed/MaskAlgorithmChangedProcessor.java @@ -21,7 +21,7 @@ import org.apache.shardingsphere.mask.config.MaskRuleConfiguration; import org.apache.shardingsphere.mask.metadata.nodepath.MaskRuleNodePathProvider; import org.apache.shardingsphere.mask.rule.MaskRule; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import java.util.LinkedHashMap; import java.util.LinkedList; diff --git a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingLoadBalancerChangedProcessor.java b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingLoadBalancerChangedProcessor.java index 3216297fbac79..9cd3a7365486f 100644 --- a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingLoadBalancerChangedProcessor.java +++ b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/changed/ReadwriteSplittingLoadBalancerChangedProcessor.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.readwritesplitting.rule.changed; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import org.apache.shardingsphere.readwritesplitting.config.ReadwriteSplittingRuleConfiguration; import org.apache.shardingsphere.readwritesplitting.metadata.nodepath.ReadwriteSplittingRuleNodePathProvider; import org.apache.shardingsphere.readwritesplitting.rule.ReadwriteSplittingRule; diff --git a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/rule/changed/ShadowAlgorithmChangedProcessor.java b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/rule/changed/ShadowAlgorithmChangedProcessor.java index 541c8f4ea89ea..c50d7fad8c1fa 100644 --- a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/rule/changed/ShadowAlgorithmChangedProcessor.java +++ b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/rule/changed/ShadowAlgorithmChangedProcessor.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.shadow.rule.changed; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import org.apache.shardingsphere.shadow.config.ShadowRuleConfiguration; import org.apache.shardingsphere.shadow.metadata.nodepath.ShadowRuleNodePathProvider; import org.apache.shardingsphere.shadow.rule.ShadowRule; diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/KeyGeneratorChangedProcessor.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/KeyGeneratorChangedProcessor.java index 2e6359c740a15..f8d460ab42caa 100644 --- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/KeyGeneratorChangedProcessor.java +++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/KeyGeneratorChangedProcessor.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.sharding.rule.changed; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration; import org.apache.shardingsphere.sharding.metadata.nodepath.ShardingRuleNodePathProvider; import org.apache.shardingsphere.sharding.rule.ShardingRule; diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAlgorithmChangedProcessor.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAlgorithmChangedProcessor.java index c39ed28ba6ac4..49f74875d1707 100644 --- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAlgorithmChangedProcessor.java +++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAlgorithmChangedProcessor.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.sharding.rule.changed; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration; import org.apache.shardingsphere.sharding.metadata.nodepath.ShardingRuleNodePathProvider; import org.apache.shardingsphere.sharding.rule.ShardingRule; diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAuditorChangedProcessor.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAuditorChangedProcessor.java index cab3ad91a379e..61701577819d7 100644 --- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAuditorChangedProcessor.java +++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rule/changed/ShardingAuditorChangedProcessor.java @@ -18,7 +18,7 @@ package org.apache.shardingsphere.sharding.rule.changed; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration; import org.apache.shardingsphere.sharding.metadata.nodepath.ShardingRuleNodePathProvider; import org.apache.shardingsphere.sharding.rule.ShardingRule; diff --git a/infra/algorithm/core/pom.xml b/infra/algorithm/core/pom.xml index 09556957043a3..85fd2b27bfdcd 100644 --- a/infra/algorithm/core/pom.xml +++ b/infra/algorithm/core/pom.xml @@ -29,7 +29,7 @@ org.apache.shardingsphere - shardingsphere-infra-common + shardingsphere-mode-api ${project.version} diff --git a/mode/core/src/main/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessor.java b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/processor/AlgorithmChangedProcessor.java similarity index 98% rename from mode/core/src/main/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessor.java rename to infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/processor/AlgorithmChangedProcessor.java index 580b2eb56b034..16bccca49accd 100644 --- a/mode/core/src/main/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessor.java +++ b/infra/algorithm/core/src/main/java/org/apache/shardingsphere/infra/algorithm/core/processor/AlgorithmChangedProcessor.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.processor; +package org.apache.shardingsphere.infra.algorithm.core.processor; import lombok.RequiredArgsConstructor; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/AlgorithmChangedProcessorTest.java similarity index 94% rename from mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java rename to infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/AlgorithmChangedProcessorTest.java index b34845460a95c..d6c3dae120418 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/AlgorithmChangedProcessorTest.java +++ b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/AlgorithmChangedProcessorTest.java @@ -15,9 +15,11 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.processor; +package org.apache.shardingsphere.infra.algorithm.core.processor; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; +import org.apache.shardingsphere.infra.algorithm.core.processor.fixture.AlgorithmChangedProcessorFixtureRule; +import org.apache.shardingsphere.infra.algorithm.core.processor.fixture.AlgorithmChangedProcessorFixtureRuleConfiguration; import org.apache.shardingsphere.infra.algorithm.core.yaml.YamlAlgorithmConfiguration; import org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase; import org.apache.shardingsphere.infra.metadata.database.rule.RuleMetaData; @@ -25,8 +27,6 @@ import org.apache.shardingsphere.infra.util.yaml.YamlEngine; import org.apache.shardingsphere.mode.event.dispatch.rule.alter.AlterNamedRuleItemEvent; import org.apache.shardingsphere.mode.event.dispatch.rule.drop.DropNamedRuleItemEvent; -import org.apache.shardingsphere.mode.processor.fixture.AlgorithmChangedProcessorFixtureRule; -import org.apache.shardingsphere.mode.processor.fixture.AlgorithmChangedProcessorFixtureRuleConfiguration; import org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor; import org.junit.jupiter.api.Test; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/AlgorithmChangedProcessorFixtureRule.java b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/AlgorithmChangedProcessorFixtureRule.java similarity index 94% rename from mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/AlgorithmChangedProcessorFixtureRule.java rename to infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/AlgorithmChangedProcessorFixtureRule.java index 66c0ce67adbf8..fecc2c88b187a 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/AlgorithmChangedProcessorFixtureRule.java +++ b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/AlgorithmChangedProcessorFixtureRule.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.processor.fixture; +package org.apache.shardingsphere.infra.algorithm.core.processor.fixture; import lombok.Getter; import lombok.RequiredArgsConstructor; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java similarity index 94% rename from mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java rename to infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java index 60f7424a31796..970c9c603b13d 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java +++ b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/AlgorithmChangedProcessorFixtureRuleConfiguration.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.processor.fixture; +package org.apache.shardingsphere.infra.algorithm.core.processor.fixture; import lombok.Getter; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; diff --git a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/FixtureAlgorithmChangedProcessor.java b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/FixtureAlgorithmChangedProcessor.java similarity index 91% rename from mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/FixtureAlgorithmChangedProcessor.java rename to infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/FixtureAlgorithmChangedProcessor.java index fe4e3520fa6aa..8863bf6bfe7e6 100644 --- a/mode/core/src/test/java/org/apache/shardingsphere/mode/processor/fixture/FixtureAlgorithmChangedProcessor.java +++ b/infra/algorithm/core/src/test/java/org/apache/shardingsphere/infra/algorithm/core/processor/fixture/FixtureAlgorithmChangedProcessor.java @@ -15,10 +15,10 @@ * limitations under the License. */ -package org.apache.shardingsphere.mode.processor.fixture; +package org.apache.shardingsphere.infra.algorithm.core.processor.fixture; import org.apache.shardingsphere.infra.algorithm.core.config.AlgorithmConfiguration; -import org.apache.shardingsphere.mode.processor.AlgorithmChangedProcessor; +import org.apache.shardingsphere.infra.algorithm.core.processor.AlgorithmChangedProcessor; import java.util.Map; diff --git a/mode/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor b/infra/algorithm/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor similarity index 88% rename from mode/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor rename to infra/algorithm/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor index 3d370fa5414a7..f86b165396cb1 100644 --- a/mode/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor +++ b/infra/algorithm/core/src/test/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RuleItemConfigurationChangedProcessor @@ -15,4 +15,4 @@ # limitations under the License. # -org.apache.shardingsphere.mode.processor.fixture.FixtureAlgorithmChangedProcessor +org.apache.shardingsphere.infra.algorithm.core.processor.fixture.FixtureAlgorithmChangedProcessor