You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by to...@apache.org on 2024/05/04 17:51:40 UTC

(shardingsphere) branch master updated: Remove RepositoryTupleSwapper.getRuleTypeName() (#31114)

This is an automated email from the ASF dual-hosted git repository.

totalo 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 4b065daf9e0 Remove RepositoryTupleSwapper.getRuleTypeName() (#31114)
4b065daf9e0 is described below

commit 4b065daf9e0a46c922b97aa304449250b37b01f1
Author: Liang Zhang <zh...@apache.org>
AuthorDate: Sun May 5 01:51:33 2024 +0800

    Remove RepositoryTupleSwapper.getRuleTypeName() (#31114)
---
 .../swapper/BroadcastRuleConfigurationRepositoryTupleSwapper.java  | 5 -----
 .../swapper/EncryptRuleConfigurationRepositoryTupleSwapper.java    | 5 -----
 .../yaml/swapper/MaskRuleConfigurationRepositoryTupleSwapper.java  | 5 -----
 .../ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper.java | 5 -----
 .../swapper/ShadowRuleConfigurationRepositoryTupleSwapper.java     | 5 -----
 .../swapper/ShardingRuleConfigurationRepositoryTupleSwapper.java   | 5 -----
 .../swapper/AuthorityRuleConfigurationRepositoryTupleSwapper.java  | 5 -----
 .../GlobalClockRuleConfigurationRepositoryTupleSwapper.java        | 5 -----
 .../swapper/LoggingRuleConfigurationRepositoryTupleSwapper.java    | 5 -----
 .../swapper/SingleRuleConfigurationRepositoryTupleSwapper.java     | 5 -----
 .../SQLFederationRuleConfigurationRepositoryTupleSwapper.java      | 5 -----
 .../swapper/SQLParserRuleConfigurationRepositoryTupleSwapper.java  | 5 -----
 .../SQLTranslatorRuleConfigurationRepositoryTupleSwapper.java      | 5 -----
 .../swapper/TrafficRuleConfigurationRepositoryTupleSwapper.java    | 5 -----
 .../TransactionRuleConfigurationRepositoryTupleSwapper.java        | 5 -----
 .../org/apache/shardingsphere/mode/spi/RepositoryTupleSwapper.java | 7 -------
 16 files changed, 82 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
index b79732a666e..5ee0fc47068 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
  */
 public final class BroadcastRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlBroadcastRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "broadcast";
-    }
-    
     @Override
     public int getOrder() {
         return BroadcastOrder.ORDER;
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
index 44230f85b14..3b5f832ceca 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
  */
 public final class EncryptRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlEncryptRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "encrypt";
-    }
-    
     @Override
     public int getOrder() {
         return EncryptOrder.ORDER;
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
index a4707c9385d..116de0a8e3b 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
  */
 public final class MaskRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlMaskRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "mask";
-    }
-    
     @Override
     public int getOrder() {
         return MaskOrder.ORDER;
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
index db9be9a2455..ef717491759 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.readwritesplitting.yaml.config.YamlReadwriteSpl
  */
 public final class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlReadwriteSplittingRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "readwrite_splitting";
-    }
-    
     @Override
     public int getOrder() {
         return ReadwriteSplittingOrder.ORDER;
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
index 811f3551700..5ec218e114b 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.shadow.yaml.config.YamlShadowRuleConfiguration;
  */
 public final class ShadowRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlShadowRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "shadow";
-    }
-    
     @Override
     public int getOrder() {
         return ShadowOrder.ORDER;
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
index 50bdbae5f91..f5584b5d4e2 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.sharding.yaml.config.YamlShardingRuleConfigurat
  */
 public final class ShardingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlShardingRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "sharding";
-    }
-    
     @Override
     public int getOrder() {
         return ShardingOrder.ORDER;
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
index a2abcca2f7e..2f51041b204 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
  */
 public final class AuthorityRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlAuthorityRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "authority";
-    }
-    
     @Override
     public int getOrder() {
         return AuthorityOrder.ORDER;
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
index c14a3124b4c..73e0e910ed5 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
  */
 public final class GlobalClockRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlGlobalClockRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "global_clock";
-    }
-    
     @Override
     public int getOrder() {
         return GlobalClockOrder.ORDER;
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
index 444347cba0c..7dbab73a3ea 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.mode.spi.RepositoryTupleSwapper;
  */
 public final class LoggingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlLoggingRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "logging";
-    }
-    
     @Override
     public int getOrder() {
         return LoggingOrder.ORDER;
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
index 4337991ce3d..3ac7bc00641 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.single.yaml.config.pojo.YamlSingleRuleConfigura
  */
 public final class SingleRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlSingleRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "single";
-    }
-    
     @Override
     public int getOrder() {
         return SingleOrder.ORDER;
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
index 6c7669bbdec..67535fa976d 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.sqlfederation.yaml.config.YamlSQLFederationRule
  */
 public final class SQLFederationRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlSQLFederationRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "sql_federation";
-    }
-    
     @Override
     public int getOrder() {
         return SQLFederationOrder.ORDER;
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
index 7d41a558a2a..78fcf99a505 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.parser.yaml.config.YamlSQLParserRuleConfigurati
  */
 public final class SQLParserRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlSQLParserRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "sql_parser";
-    }
-    
     @Override
     public int getOrder() {
         return SQLParserOrder.ORDER;
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
index 86c1c215fc9..837c6b8245d 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.sqltranslator.yaml.config.YamlSQLTranslatorRule
  */
 public final class SQLTranslatorRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlSQLTranslatorRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "sql_translator";
-    }
-    
     @Override
     public int getOrder() {
         return SQLTranslatorOrder.ORDER;
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
index abfd53d333f..4709728f34b 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.traffic.yaml.config.YamlTrafficRuleConfiguratio
  */
 public final class TrafficRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlTrafficRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "traffic";
-    }
-    
     @Override
     public int getOrder() {
         return TrafficOrder.ORDER;
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
index 0b975360fe9..bb01bc29e94 100644
--- 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
@@ -26,11 +26,6 @@ import org.apache.shardingsphere.transaction.yaml.config.YamlTransactionRuleConf
  */
 public final class TransactionRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper<YamlTransactionRuleConfiguration> {
     
-    @Override
-    public String getRuleTypeName() {
-        return "transaction";
-    }
-    
     @Override
     public int getOrder() {
         return TransactionOrder.ORDER;
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
index cff459e4767..c9f5b3b415d 100644
--- 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
@@ -28,11 +28,4 @@ import org.apache.shardingsphere.infra.yaml.config.pojo.rule.YamlRuleConfigurati
  */
 @SingletonSPI
 public interface RepositoryTupleSwapper<T extends YamlRuleConfiguration> extends OrderedSPI<T> {
-    
-    /**
-     * Get rule type name.
-     *
-     * @return rule type name
-     */
-    String getRuleTypeName();
 }