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 28a4ce56206 Remove RepositoryTupleSwapper (#31129)
28a4ce56206 is described below
commit 28a4ce5620639a0231fe84b0a5aa8ea50e3f1fd0
Author: Liang Zhang <[email protected]>
AuthorDate: Mon May 6 14:45:58 2024 +0800
Remove RepositoryTupleSwapper (#31129)
* Remove RepositoryTupleSwapper
* Remove RepositoryTupleSwapper
---
...astRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...yptRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...askRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ingRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...dowRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ingRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ityRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ockRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ingRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...gleRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ionRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...serRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...torRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ficRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
...ionRuleConfigurationRepositoryTupleSwapper.java | 38 ----------------------
....shardingsphere.mode.spi.RepositoryTupleSwapper | 18 ----------
.../mode/engine/RepositoryTupleSwapperEngine.java | 24 +++++++++-----
.../mode/spi/RepositoryTupleSwapper.java | 31 ------------------
32 files changed, 16 insertions(+), 879 deletions(-)
diff --git
a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java
b/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 5ee0fc47068..00000000000
---
a/features/broadcast/core/src/main/java/org/apache/shardingsphere/broadcast/yaml/swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.broadcast.yaml.swapper;
-
-import org.apache.shardingsphere.broadcast.constant.BroadcastOrder;
-import
org.apache.shardingsphere.broadcast.yaml.config.YamlBroadcastRuleConfiguration;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-
-/**
- * Broadcast rule configuration repository tuple swapper.
- */
-public final class BroadcastRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlBroadcastRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return BroadcastOrder.ORDER;
- }
-
- @Override
- public Class<YamlBroadcastRuleConfiguration> getTypeClass() {
- return YamlBroadcastRuleConfiguration.class;
- }
-}
diff --git
a/features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 4b5fce2b445..00000000000
---
a/features/broadcast/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.broadcast.yaml.swapper.BroadcastRuleConfigurationRepositoryTupleSwapper
diff --git
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java
b/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 3b5f832ceca..00000000000
---
a/features/encrypt/core/src/main/java/org/apache/shardingsphere/encrypt/yaml/swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.encrypt.yaml.swapper;
-
-import org.apache.shardingsphere.encrypt.constant.EncryptOrder;
-import
org.apache.shardingsphere.encrypt.yaml.config.YamlEncryptRuleConfiguration;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-
-/**
- * Encrypt rule configuration repository tuple swapper.
- */
-public final class EncryptRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlEncryptRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return EncryptOrder.ORDER;
- }
-
- @Override
- public Class<YamlEncryptRuleConfiguration> getTypeClass() {
- return YamlEncryptRuleConfiguration.class;
- }
-}
diff --git
a/features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 227b83627e2..00000000000
---
a/features/encrypt/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.encrypt.yaml.swapper.EncryptRuleConfigurationRepositoryTupleSwapper
diff --git
a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
b/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 116de0a8e3b..00000000000
---
a/features/mask/core/src/main/java/org/apache/shardingsphere/mask/yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.mask.yaml.swapper;
-
-import org.apache.shardingsphere.mask.constant.MaskOrder;
-import org.apache.shardingsphere.mask.yaml.config.YamlMaskRuleConfiguration;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-
-/**
- * Mask rule configuration repository tuple swapper.
- */
-public final class MaskRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlMaskRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return MaskOrder.ORDER;
- }
-
- @Override
- public Class<YamlMaskRuleConfiguration> getTypeClass() {
- return YamlMaskRuleConfiguration.class;
- }
-}
diff --git
a/features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index ebaf1d7d2e5..00000000000
---
a/features/mask/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.mask.yaml.swapper.MaskRuleConfigurationRepositoryTupleSwapper
diff --git
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java
b/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index ef717491759..00000000000
---
a/features/readwrite-splitting/core/src/main/java/org/apache/shardingsphere/readwritesplitting/yaml/swapper/ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.readwritesplitting.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import
org.apache.shardingsphere.readwritesplitting.constant.ReadwriteSplittingOrder;
-import
org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSplittingRuleConfiguration;
-
-/**
- * Readwrite-splitting rule configuration repository tuple swapper.
- */
-public final class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper
implements RepositoryTupleSwapper<YamlReadwriteSplittingRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return ReadwriteSplittingOrder.ORDER;
- }
-
- @Override
- public Class<YamlReadwriteSplittingRuleConfiguration> getTypeClass() {
- return YamlReadwriteSplittingRuleConfiguration.class;
- }
-}
diff --git
a/features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 123a4326117..00000000000
---
a/features/readwrite-splitting/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.readwritesplitting.yaml.swapper.ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper
diff --git
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java
b/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 5ec218e114b..00000000000
---
a/features/shadow/core/src/main/java/org/apache/shardingsphere/shadow/yaml/swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.shadow.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.shadow.constant.ShadowOrder;
-import
org.apache.shardingsphere.shadow.yaml.config.YamlShadowRuleConfiguration;
-
-/**
- * Shadow rule configuration repository tuple swapper.
- */
-public final class ShadowRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlShadowRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return ShadowOrder.ORDER;
- }
-
- @Override
- public Class<YamlShadowRuleConfiguration> getTypeClass() {
- return YamlShadowRuleConfiguration.class;
- }
-}
diff --git
a/features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 23410883050..00000000000
---
a/features/shadow/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.shadow.yaml.swapper.ShadowRuleConfigurationRepositoryTupleSwapper
diff --git
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java
b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index f5584b5d4e2..00000000000
---
a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/yaml/swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.sharding.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.sharding.constant.ShardingOrder;
-import
org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfiguration;
-
-/**
- * Sharding rule configuration repository tuple swapper.
- */
-public final class ShardingRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlShardingRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return ShardingOrder.ORDER;
- }
-
- @Override
- public Class<YamlShardingRuleConfiguration> getTypeClass() {
- return YamlShardingRuleConfiguration.class;
- }
-}
diff --git
a/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 2a127dea425..00000000000
---
a/features/sharding/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.sharding.yaml.swapper.ShardingRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java
b/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 2f51041b204..00000000000
---
a/kernel/authority/core/src/main/java/org/apache/shardingsphere/authority/yaml/swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.authority.yaml.swapper;
-
-import org.apache.shardingsphere.authority.constant.AuthorityOrder;
-import
org.apache.shardingsphere.authority.yaml.config.YamlAuthorityRuleConfiguration;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-
-/**
- * Authority rule configuration repository tuple swapper.
- */
-public final class AuthorityRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlAuthorityRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return AuthorityOrder.ORDER;
- }
-
- @Override
- public Class<YamlAuthorityRuleConfiguration> getTypeClass() {
- return YamlAuthorityRuleConfiguration.class;
- }
-}
diff --git
a/kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index f2862566764..00000000000
---
a/kernel/authority/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.authority.yaml.swapper.AuthorityRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 73e0e910ed5..00000000000
---
a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.globalclock.yaml.swapper;
-
-import org.apache.shardingsphere.globalclock.rule.constant.GlobalClockOrder;
-import
org.apache.shardingsphere.globalclock.yaml.config.YamlGlobalClockRuleConfiguration;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-
-/**
- * Global clock rule configuration repository tuple swapper.
- */
-public final class GlobalClockRuleConfigurationRepositoryTupleSwapper
implements RepositoryTupleSwapper<YamlGlobalClockRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return GlobalClockOrder.ORDER;
- }
-
- @Override
- public Class<YamlGlobalClockRuleConfiguration> getTypeClass() {
- return YamlGlobalClockRuleConfiguration.class;
- }
-}
diff --git
a/kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index e0c54b7434f..00000000000
---
a/kernel/global-clock/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.globalclock.yaml.swapper.GlobalClockRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java
b/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 7dbab73a3ea..00000000000
---
a/kernel/logging/core/src/main/java/org/apache/shardingsphere/logging/yaml/swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.logging.yaml.swapper;
-
-import org.apache.shardingsphere.logging.constant.LoggingOrder;
-import
org.apache.shardingsphere.logging.yaml.config.YamlLoggingRuleConfiguration;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-
-/**
- * Logging rule configuration repository tuple swapper.
- */
-public final class LoggingRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlLoggingRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return LoggingOrder.ORDER;
- }
-
- @Override
- public Class<YamlLoggingRuleConfiguration> getTypeClass() {
- return YamlLoggingRuleConfiguration.class;
- }
-}
diff --git
a/kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 542e84bf2d0..00000000000
---
a/kernel/logging/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.logging.yaml.swapper.LoggingRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java
b/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 3ac7bc00641..00000000000
---
a/kernel/single/core/src/main/java/org/apache/shardingsphere/single/yaml/config/swapper/SingleRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.single.yaml.config.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.single.constant.SingleOrder;
-import
org.apache.shardingsphere.single.yaml.config.pojo.YamlSingleRuleConfiguration;
-
-/**
- * Single rule configuration repository tuple swapper.
- */
-public final class SingleRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlSingleRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return SingleOrder.ORDER;
- }
-
- @Override
- public Class<YamlSingleRuleConfiguration> getTypeClass() {
- return YamlSingleRuleConfiguration.class;
- }
-}
diff --git
a/kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 6f9efb76aa1..00000000000
---
a/kernel/single/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.single.yaml.config.swapper.SingleRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java
b/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 67535fa976d..00000000000
---
a/kernel/sql-federation/core/src/main/java/org/apache/shardingsphere/sqlfederation/yaml/swapper/SQLFederationRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.sqlfederation.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.sqlfederation.constant.SQLFederationOrder;
-import
org.apache.shardingsphere.sqlfederation.yaml.config.YamlSQLFederationRuleConfiguration;
-
-/**
- * SQL federation rule configuration repository tuple swapper.
- */
-public final class SQLFederationRuleConfigurationRepositoryTupleSwapper
implements RepositoryTupleSwapper<YamlSQLFederationRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return SQLFederationOrder.ORDER;
- }
-
- @Override
- public Class<YamlSQLFederationRuleConfiguration> getTypeClass() {
- return YamlSQLFederationRuleConfiguration.class;
- }
-}
diff --git
a/kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 1c496a00368..00000000000
---
a/kernel/sql-federation/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.sqlfederation.yaml.swapper.SQLFederationRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java
b/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 78fcf99a505..00000000000
---
a/kernel/sql-parser/core/src/main/java/org/apache/shardingsphere/parser/yaml/swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.parser.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.parser.constant.SQLParserOrder;
-import
org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfiguration;
-
-/**
- * SQL parser rule configuration repository tuple swapper.
- */
-public final class SQLParserRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlSQLParserRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return SQLParserOrder.ORDER;
- }
-
- @Override
- public Class<YamlSQLParserRuleConfiguration> getTypeClass() {
- return YamlSQLParserRuleConfiguration.class;
- }
-}
diff --git
a/kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 3c0b4917f3c..00000000000
---
a/kernel/sql-parser/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.parser.yaml.swapper.SQLParserRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java
b/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 837c6b8245d..00000000000
---
a/kernel/sql-translator/core/src/main/java/org/apache/shardingsphere/sqltranslator/yaml/swapper/SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.sqltranslator.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.sqltranslator.constant.SQLTranslatorOrder;
-import
org.apache.shardingsphere.sqltranslator.yaml.config.YamlSQLTranslatorRuleConfiguration;
-
-/**
- * SQL translator rule configuration repository tuple swapper.
- */
-public final class SQLTranslatorRuleConfigurationRepositoryTupleSwapper
implements RepositoryTupleSwapper<YamlSQLTranslatorRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return SQLTranslatorOrder.ORDER;
- }
-
- @Override
- public Class<YamlSQLTranslatorRuleConfiguration> getTypeClass() {
- return YamlSQLTranslatorRuleConfiguration.class;
- }
-}
diff --git
a/kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index a8c97d75d00..00000000000
---
a/kernel/sql-translator/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.sqltranslator.yaml.swapper.SQLTranslatorRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java
b/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index 4709728f34b..00000000000
---
a/kernel/traffic/core/src/main/java/org/apache/shardingsphere/traffic/yaml/swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.traffic.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.traffic.constant.TrafficOrder;
-import
org.apache.shardingsphere.traffic.yaml.config.YamlTrafficRuleConfiguration;
-
-/**
- * Traffic rule configuration repository tuple swapper.
- */
-public final class TrafficRuleConfigurationRepositoryTupleSwapper implements
RepositoryTupleSwapper<YamlTrafficRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return TrafficOrder.ORDER;
- }
-
- @Override
- public Class<YamlTrafficRuleConfiguration> getTypeClass() {
- return YamlTrafficRuleConfiguration.class;
- }
-}
diff --git
a/kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 2eef2009860..00000000000
---
a/kernel/traffic/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.traffic.yaml.swapper.TrafficRuleConfigurationRepositoryTupleSwapper
diff --git
a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java
b/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java
deleted file mode 100644
index bb01bc29e94..00000000000
---
a/kernel/transaction/core/src/main/java/org/apache/shardingsphere/transaction/yaml/swapper/TransactionRuleConfigurationRepositoryTupleSwapper.java
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.transaction.yaml.swapper;
-
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
-import org.apache.shardingsphere.transaction.constant.TransactionOrder;
-import
org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConfiguration;
-
-/**
- * Transaction rule configuration repository tuple swapper.
- */
-public final class TransactionRuleConfigurationRepositoryTupleSwapper
implements RepositoryTupleSwapper<YamlTransactionRuleConfiguration> {
-
- @Override
- public int getOrder() {
- return TransactionOrder.ORDER;
- }
-
- @Override
- public Class<YamlTransactionRuleConfiguration> getTypeClass() {
- return YamlTransactionRuleConfiguration.class;
- }
-}
diff --git
a/kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
b/kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
deleted file mode 100644
index 75fd0885c3b..00000000000
---
a/kernel/transaction/core/src/main/resources/META-INF/services/org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper
+++ /dev/null
@@ -1,18 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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.
-#
-
-org.apache.shardingsphere.transaction.yaml.swapper.TransactionRuleConfigurationRepositoryTupleSwapper
diff --git
a/mode/api/src/main/java/org/apache/shardingsphere/mode/engine/RepositoryTupleSwapperEngine.java
b/mode/api/src/main/java/org/apache/shardingsphere/mode/engine/RepositoryTupleSwapperEngine.java
index dadd6488836..3a6a43cbead 100644
---
a/mode/api/src/main/java/org/apache/shardingsphere/mode/engine/RepositoryTupleSwapperEngine.java
+++
b/mode/api/src/main/java/org/apache/shardingsphere/mode/engine/RepositoryTupleSwapperEngine.java
@@ -20,6 +20,7 @@ package org.apache.shardingsphere.mode.engine;
import com.google.common.base.Strings;
import lombok.SneakyThrows;
import org.apache.shardingsphere.infra.config.rule.RuleConfiguration;
+import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPILoader;
import org.apache.shardingsphere.infra.spi.type.typed.TypedSPILoader;
import org.apache.shardingsphere.infra.util.yaml.YamlEngine;
@@ -30,10 +31,10 @@ import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.annotation.Reposito
import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.annotation.RepositoryTupleField;
import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.annotation.RepositoryTupleKeyNameGenerator;
import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.annotation.RepositoryTupleType;
+import
org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlRuleConfigurationSwapper;
import
org.apache.shardingsphere.infra.yaml.config.swapper.rule.YamlRuleConfigurationSwapperEngine;
import org.apache.shardingsphere.mode.path.GlobalNodePath;
import org.apache.shardingsphere.mode.path.rule.RuleNodePath;
-import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
import org.apache.shardingsphere.mode.spi.RuleNodePathProvider;
import java.lang.reflect.Field;
@@ -245,15 +246,16 @@ public final class RepositoryTupleSwapperEngine {
* @param repositoryTuples repository tuples
* @return global rule configurations
*/
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings("rawtypes")
public Collection<RuleConfiguration> swapToRuleConfigurations(final
Collection<RepositoryTuple> repositoryTuples) {
if (repositoryTuples.isEmpty()) {
return Collections.emptyList();
}
Collection<RuleConfiguration> result = new LinkedList<>();
YamlRuleConfigurationSwapperEngine yamlSwapperEngine = new
YamlRuleConfigurationSwapperEngine();
- for (RepositoryTupleSwapper each :
OrderedSPILoader.getServices(RepositoryTupleSwapper.class)) {
- swapToYamlRuleConfiguration(repositoryTuples,
each.getTypeClass()).ifPresent(optional ->
result.add(yamlSwapperEngine.swapToRuleConfiguration((YamlRuleConfiguration)
optional)));
+ for (YamlRuleConfigurationSwapper each :
OrderedSPILoader.getServices(YamlRuleConfigurationSwapper.class)) {
+ Class<? extends YamlRuleConfiguration> yamlRuleConfigClass =
getYamlRuleConfigurationClass(each);
+ swapToYamlRuleConfiguration(repositoryTuples,
yamlRuleConfigClass).ifPresent(optional ->
result.add(yamlSwapperEngine.swapToRuleConfiguration(optional)));
}
return result;
}
@@ -265,18 +267,24 @@ public final class RepositoryTupleSwapperEngine {
* @param repositoryTuples repository tuples
* @return global rule configuration
*/
- @SuppressWarnings({"unchecked", "rawtypes"})
+ @SuppressWarnings("rawtypes")
public Optional<RuleConfiguration> swapToRuleConfiguration(final String
ruleTypeName, final Collection<RepositoryTuple> repositoryTuples) {
if (repositoryTuples.isEmpty()) {
return Optional.empty();
}
YamlRuleConfigurationSwapperEngine yamlSwapperEngine = new
YamlRuleConfigurationSwapperEngine();
- for (RepositoryTupleSwapper each :
OrderedSPILoader.getServices(RepositoryTupleSwapper.class)) {
- if
(ruleTypeName.equals(Objects.requireNonNull((RepositoryTupleEntity)
each.getTypeClass().getAnnotation(RepositoryTupleEntity.class)).value())) {
- Optional<YamlRuleConfiguration> yamlRuleConfig =
swapToYamlRuleConfiguration(repositoryTuples, each.getTypeClass());
+ for (YamlRuleConfigurationSwapper each :
ShardingSphereServiceLoader.getServiceInstances(YamlRuleConfigurationSwapper.class))
{
+ Class<? extends YamlRuleConfiguration> yamlRuleConfigClass =
getYamlRuleConfigurationClass(each);
+ if
(ruleTypeName.equals(Objects.requireNonNull(yamlRuleConfigClass.getAnnotation(RepositoryTupleEntity.class)).value()))
{
+ Optional<YamlRuleConfiguration> yamlRuleConfig =
swapToYamlRuleConfiguration(repositoryTuples, yamlRuleConfigClass);
return
yamlRuleConfig.map(yamlSwapperEngine::swapToRuleConfiguration);
}
}
return Optional.empty();
}
+
+ @SuppressWarnings({"unchecked", "rawtypes"})
+ private Class<? extends YamlRuleConfiguration>
getYamlRuleConfigurationClass(final YamlRuleConfigurationSwapper swapper) {
+ return (Class<? extends YamlRuleConfiguration>) ((ParameterizedType)
swapper.getClass().getGenericInterfaces()[0]).getActualTypeArguments()[0];
+ }
}
diff --git
a/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java
b/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java
deleted file mode 100644
index c9f5b3b415d..00000000000
---
a/mode/api/src/main/java/org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You 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 org.apache.shardingsphere.mode.spi;
-
-import org.apache.shardingsphere.infra.spi.annotation.SingletonSPI;
-import org.apache.shardingsphere.infra.spi.type.ordered.OrderedSPI;
-import
org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfiguration;
-
-/**
- * Repository tuple swapper.
- *
- * @param <T> type of swapped YAML rule configuration
- */
-@SingletonSPI
-public interface RepositoryTupleSwapper<T extends YamlRuleConfiguration>
extends OrderedSPI<T> {
-}