From 4b065daf9e0a46c922b97aa304449250b37b01f1 Mon Sep 17 00:00:00 2001 From: Liang Zhang Date: Sun, 5 May 2024 01:51:33 +0800 Subject: [PATCH] Remove RepositoryTupleSwapper.getRuleTypeName() (#31114) --- .../BroadcastRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../EncryptRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../MaskRuleConfigurationRepositoryTupleSwapper.java | 5 ----- ...teSplittingRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../ShadowRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../ShardingRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../AuthorityRuleConfigurationRepositoryTupleSwapper.java | 5 ----- ...GlobalClockRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../LoggingRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../SingleRuleConfigurationRepositoryTupleSwapper.java | 5 ----- ...LFederationRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../SQLParserRuleConfigurationRepositoryTupleSwapper.java | 5 ----- ...LTranslatorRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../TrafficRuleConfigurationRepositoryTupleSwapper.java | 5 ----- ...TransactionRuleConfigurationRepositoryTupleSwapper.java | 5 ----- .../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 b79732a666e17..5ee0fc47068b2 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 @@ */ public final class BroadcastRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 44230f85b1448..3b5f832ceca08 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 @@ */ public final class EncryptRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 a4707c9385d74..116de0a8e3b2f 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 @@ */ public final class MaskRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 db9be9a2455ef..ef717491759d6 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 @@ */ public final class ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 811f355170029..5ec218e114b5f 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 @@ */ public final class ShadowRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 50bdbae5f91a0..f5584b5d4e2db 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 @@ */ public final class ShardingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 a2abcca2f7e3c..2f51041b20463 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 @@ */ public final class AuthorityRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 c14a3124b4c39..73e0e910ed51c 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 @@ */ public final class GlobalClockRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 444347cba0c59..7dbab73a3ea31 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 @@ */ public final class LoggingRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 4337991ce3d01..3ac7bc006412c 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 @@ */ public final class SingleRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 6c7669bbdeca8..67535fa976d26 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 @@ */ public final class SQLFederationRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 7d41a558a2a42..78fcf99a505c2 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 @@ */ public final class SQLParserRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 86c1c215fc9a3..837c6b8245d3e 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 @@ */ public final class SQLTranslatorRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 abfd53d333ff1..4709728f34b4a 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 @@ */ public final class TrafficRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 0b975360fe90a..bb01bc29e94ec 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 @@ */ public final class TransactionRuleConfigurationRepositoryTupleSwapper implements RepositoryTupleSwapper { - @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 cff459e476734..c9f5b3b415d48 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 @@ */ @SingletonSPI public interface RepositoryTupleSwapper extends OrderedSPI { - - /** - * Get rule type name. - * - * @return rule type name - */ - String getRuleTypeName(); }