This is an automated email from the ASF dual-hosted git repository.
sunnianjun 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 87e02b38f0c Remove RepositoryTupleSwapper.swapToRepositoryTuples with
RuleConfiguration (#31073)
87e02b38f0c is described below
commit 87e02b38f0c6d659a5b0babc2eef60d50a9c9aa3
Author: Liang Zhang <[email protected]>
AuthorDate: Tue Apr 30 16:17:55 2024 +0800
Remove RepositoryTupleSwapper.swapToRepositoryTuples with RuleConfiguration
(#31073)
---
...adcastRuleConfigurationRepositoryTupleSwapper.java | 7 -------
...ncryptRuleConfigurationRepositoryTupleSwapper.java | 13 -------------
.../MaskRuleConfigurationRepositoryTupleSwapper.java | 13 -------------
...ittingRuleConfigurationRepositoryTupleSwapper.java | 15 ---------------
...ShadowRuleConfigurationRepositoryTupleSwapper.java | 19 -------------------
...ardingRuleConfigurationRepositoryTupleSwapper.java | 16 ----------------
...horityRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...lClockRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...oggingRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...SingleRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...rationRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...ParserRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...slatorRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...rafficRuleConfigurationRepositoryTupleSwapper.java | 5 -----
...actionRuleConfigurationRepositoryTupleSwapper.java | 5 -----
.../mode/spi/RepositoryTupleSwapper.java | 8 --------
16 files changed, 136 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 b189b741f80..b57b52066de 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
@@ -48,13 +48,6 @@ public final class
BroadcastRuleConfigurationRepositoryTupleSwapper implements R
: Collections.singleton(new
RepositoryTuple(BroadcastRuleNodePathProvider.TABLES,
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
BroadcastRuleConfiguration data) {
- return data.getTables().isEmpty()
- ? Collections.emptyList()
- : Collections.singleton(new
RepositoryTuple(BroadcastRuleNodePathProvider.TABLES,
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<BroadcastRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
List<RepositoryTuple> validTuples =
repositoryTuples.stream().filter(each ->
broadcastRuleNodePath.getRoot().isValidatedPath(each.getKey())).collect(Collectors.toList());
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 98ac434ba2e..8f999b3f7b5 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
@@ -58,19 +58,6 @@ public final class
EncryptRuleConfigurationRepositoryTupleSwapper implements Rep
return result;
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
EncryptRuleConfiguration data) {
- Collection<RepositoryTuple> result = new LinkedList<>();
- YamlEncryptRuleConfiguration yamlConfig =
ruleConfigSwapper.swapToYamlConfiguration(data);
- for (Entry<String, YamlAlgorithmConfiguration> entry :
yamlConfig.getEncryptors().entrySet()) {
- result.add(new
RepositoryTuple(encryptRuleNodePath.getNamedItem(EncryptRuleNodePathProvider.ENCRYPTORS).getPath(entry.getKey()),
YamlEngine.marshal(entry.getValue())));
- }
- for (YamlEncryptTableRuleConfiguration each :
yamlConfig.getTables().values()) {
- result.add(new
RepositoryTuple(encryptRuleNodePath.getNamedItem(EncryptRuleNodePathProvider.TABLES).getPath(each.getName()),
YamlEngine.marshal(each)));
- }
- return result;
- }
-
@Override
public Optional<EncryptRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
List<RepositoryTuple> validTuples =
repositoryTuples.stream().filter(each ->
encryptRuleNodePath.getRoot().isValidatedPath(each.getKey())).collect(Collectors.toList());
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 198cd0fe50c..a1c12a6ca9b 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
@@ -58,19 +58,6 @@ public final class
MaskRuleConfigurationRepositoryTupleSwapper implements Reposi
return result;
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
MaskRuleConfiguration data) {
- Collection<RepositoryTuple> result = new LinkedList<>();
- YamlMaskRuleConfiguration yamlRuleConfig =
ruleConfigSwapper.swapToYamlConfiguration(data);
- for (Entry<String, YamlAlgorithmConfiguration> entry :
yamlRuleConfig.getMaskAlgorithms().entrySet()) {
- result.add(new
RepositoryTuple(maskRuleNodePath.getNamedItem(MaskRuleNodePathProvider.MASK_ALGORITHMS).getPath(entry.getKey()),
YamlEngine.marshal(entry.getValue())));
- }
- for (YamlMaskTableRuleConfiguration each :
yamlRuleConfig.getTables().values()) {
- result.add(new
RepositoryTuple(maskRuleNodePath.getNamedItem(MaskRuleNodePathProvider.TABLES).getPath(each.getName()),
YamlEngine.marshal(each)));
- }
- return result;
- }
-
@Override
public Optional<MaskRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
List<RepositoryTuple> validTuples =
repositoryTuples.stream().filter(each ->
maskRuleNodePath.getRoot().isValidatedPath(each.getKey())).collect(Collectors.toList());
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 88c800d901c..815a9d2a3ec 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
@@ -60,21 +60,6 @@ public final class
ReadwriteSplittingRuleConfigurationRepositoryTupleSwapper imp
return result;
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
ReadwriteSplittingRuleConfiguration data) {
- Collection<RepositoryTuple> result = new LinkedList<>();
- YamlReadwriteSplittingRuleConfiguration yamlRuleConfig =
ruleConfigSwapper.swapToYamlConfiguration(data);
- for (Entry<String, YamlAlgorithmConfiguration> entry :
yamlRuleConfig.getLoadBalancers().entrySet()) {
- result.add(new
RepositoryTuple(readwriteSplittingRuleNodePath.getNamedItem(ReadwriteSplittingRuleNodePathProvider.LOAD_BALANCERS).getPath(entry.getKey()),
- YamlEngine.marshal(entry.getValue())));
- }
- for (Entry<String,
YamlReadwriteSplittingDataSourceGroupRuleConfiguration> entry :
yamlRuleConfig.getDataSourceGroups().entrySet()) {
- result.add(new RepositoryTuple(
-
readwriteSplittingRuleNodePath.getNamedItem(ReadwriteSplittingRuleNodePathProvider.DATA_SOURCES).getPath(entry.getKey()),
YamlEngine.marshal(entry.getValue())));
- }
- return result;
- }
-
@Override
public Optional<ReadwriteSplittingRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
List<RepositoryTuple> validRepositoryTuples =
repositoryTuples.stream().filter(each ->
readwriteSplittingRuleNodePath.getRoot().isValidatedPath(each.getKey())).collect(Collectors.toList());
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 52dd46c6c0d..b0b894b9c9a 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
@@ -66,25 +66,6 @@ public final class
ShadowRuleConfigurationRepositoryTupleSwapper implements Repo
return result;
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
ShadowRuleConfiguration data) {
- Collection<RepositoryTuple> result = new LinkedList<>();
- YamlShadowRuleConfiguration yamlRuleConfig =
ruleConfigSwapper.swapToYamlConfiguration(data);
- for (Entry<String, YamlAlgorithmConfiguration> entry :
yamlRuleConfig.getShadowAlgorithms().entrySet()) {
- result.add(new
RepositoryTuple(shadowRuleNodePath.getNamedItem(ShadowRuleNodePathProvider.ALGORITHMS).getPath(entry.getKey()),
YamlEngine.marshal(entry.getValue())));
- }
- if
(!Strings.isNullOrEmpty(yamlRuleConfig.getDefaultShadowAlgorithmName())) {
- result.add(new
RepositoryTuple(shadowRuleNodePath.getUniqueItem(ShadowRuleNodePathProvider.DEFAULT_ALGORITHM).getPath(),
yamlRuleConfig.getDefaultShadowAlgorithmName()));
- }
- for (Entry<String, YamlShadowDataSourceConfiguration> entry :
yamlRuleConfig.getDataSources().entrySet()) {
- result.add(new
RepositoryTuple(shadowRuleNodePath.getNamedItem(ShadowRuleNodePathProvider.DATA_SOURCES).getPath(entry.getKey()),
YamlEngine.marshal(entry.getValue())));
- }
- for (Entry<String, YamlShadowTableConfiguration> entry :
yamlRuleConfig.getTables().entrySet()) {
- result.add(new
RepositoryTuple(shadowRuleNodePath.getNamedItem(ShadowRuleNodePathProvider.TABLES).getPath(entry.getKey()),
YamlEngine.marshal(entry.getValue())));
- }
- return result;
- }
-
@Override
public Optional<ShadowRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
List<RepositoryTuple> validRepositoryTuples =
repositoryTuples.stream().filter(each ->
shadowRuleNodePath.getRoot().isValidatedPath(each.getKey())).collect(Collectors.toList());
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 1a002c14205..cab9de03349 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
@@ -66,22 +66,6 @@ public final class
ShardingRuleConfigurationRepositoryTupleSwapper implements Re
return result;
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
ShardingRuleConfiguration data) {
- YamlShardingRuleConfiguration yamlRuleConfig =
ruleConfigSwapper.swapToYamlConfiguration(data);
- Collection<RepositoryTuple> result = new LinkedList<>();
- swapAlgorithms(yamlRuleConfig, result);
- swapStrategies(yamlRuleConfig, result);
- if (null != yamlRuleConfig.getDefaultShardingColumn()) {
- result.add(new
RepositoryTuple(shardingRuleNodePath.getUniqueItem(ShardingRuleNodePathProvider.DEFAULT_SHARDING_COLUMN).getPath(),
yamlRuleConfig.getDefaultShardingColumn()));
- }
- if (null != yamlRuleConfig.getShardingCache()) {
- result.add(new
RepositoryTuple(shardingRuleNodePath.getUniqueItem(ShardingRuleNodePathProvider.SHARDING_CACHE).getPath(),
YamlEngine.marshal(yamlRuleConfig.getShardingCache())));
- }
- swapTableRules(yamlRuleConfig, result);
- return result;
- }
-
private void swapAlgorithms(final YamlShardingRuleConfiguration
yamlRuleConfig, final Collection<RepositoryTuple> repositoryTuples) {
for (Entry<String, YamlAlgorithmConfiguration> each :
yamlRuleConfig.getShardingAlgorithms().entrySet()) {
repositoryTuples.add(new
RepositoryTuple(shardingRuleNodePath.getNamedItem(ShardingRuleNodePathProvider.ALGORITHMS).getPath(each.getKey()),
YamlEngine.marshal(each.getValue())));
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 7d2ecf600da..71396fb7c0a 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
@@ -41,11 +41,6 @@ public final class
AuthorityRuleConfigurationRepositoryTupleSwapper implements R
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
AuthorityRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<AuthorityRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
diff --git
a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
index 51636de741e..a352b226e75 100644
---
a/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
+++
b/kernel/global-clock/core/src/main/java/org/apache/shardingsphere/globalclock/core/yaml/swapper/GlobalClockRuleConfigurationRepositoryTupleSwapper.java
@@ -41,11 +41,6 @@ public final class
GlobalClockRuleConfigurationRepositoryTupleSwapper implements
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
GlobalClockRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<GlobalClockRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 a9869a8f392..b63bed9dac2 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
@@ -41,11 +41,6 @@ public final class
LoggingRuleConfigurationRepositoryTupleSwapper implements Rep
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
LoggingRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<LoggingRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 662b4c8bdb5..d127d4b4704 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
@@ -45,11 +45,6 @@ public final class
SingleRuleConfigurationRepositoryTupleSwapper implements Repo
return Collections.singleton(new
RepositoryTuple(SingleRuleNodePathProvider.TABLES,
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
SingleRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(SingleRuleNodePathProvider.TABLES,
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<SingleRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples.stream().filter(each ->
singleRuleNodePath.getRoot().isValidatedPath(each.getKey())).collect(Collectors.toList()))
{
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 c910fc5ac64..bee169e7301 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
@@ -41,11 +41,6 @@ public final class
SQLFederationRuleConfigurationRepositoryTupleSwapper implemen
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
SQLFederationRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<SQLFederationRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 892a977617d..91d8200eedb 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
@@ -41,11 +41,6 @@ public final class
SQLParserRuleConfigurationRepositoryTupleSwapper implements R
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
SQLParserRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<SQLParserRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 50d9ff4ecc6..cc5bb8ff875 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
@@ -41,11 +41,6 @@ public final class
SQLTranslatorRuleConfigurationRepositoryTupleSwapper implemen
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
SQLTranslatorRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<SQLTranslatorRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 0a5c4f8df78..de8f822e283 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
@@ -41,11 +41,6 @@ public final class
TrafficRuleConfigurationRepositoryTupleSwapper implements Rep
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
TrafficRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<TrafficRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 7c8fd093707..896014d1334 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
@@ -41,11 +41,6 @@ public final class
TransactionRuleConfigurationRepositoryTupleSwapper implements
return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(yamlRuleConfig)));
}
- @Override
- public Collection<RepositoryTuple> swapToRepositoryTuples(final
TransactionRuleConfiguration data) {
- return Collections.singleton(new
RepositoryTuple(getRuleTagName().toLowerCase(),
YamlEngine.marshal(ruleConfigSwapper.swapToYamlConfiguration(data))));
- }
-
@Override
public Optional<TransactionRuleConfiguration> swapToObject(final
Collection<RepositoryTuple> repositoryTuples) {
for (RepositoryTuple each : repositoryTuples) {
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 3743794ad69..40f4fb85322 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
@@ -43,14 +43,6 @@ public interface RepositoryTupleSwapper<T extends
RuleConfiguration, Y extends Y
*/
Collection<RepositoryTuple> swapToRepositoryTuples(Y yamlRuleConfig);
- /**
- * Swap to repository tuples.
- *
- * @param data data to be swapped
- * @return repository tuples
- */
- Collection<RepositoryTuple> swapToRepositoryTuples(T data);
-
/**
* Swap from repository tuple to object.
*