This is an automated email from the ASF dual-hosted git repository.
wuweijie 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 35620a0 Rename RuleDefinitionUpdater & RuleDefinitionBackendHandler
(#11153)
35620a0 is described below
commit 35620a0c5c4030b8ac7ea3998d8216ee560efb47
Author: Liang Zhang <[email protected]>
AuthorDate: Mon Jul 5 00:18:59 2021 +0800
Rename RuleDefinitionUpdater & RuleDefinitionBackendHandler (#11153)
* Rename RuleDefinitionUpdater
* Rename RuleDefinitionBackendHandler
---
...AlterDatabaseDiscoveryRuleStatementUpdater.java | 4 +-
...reateDatabaseDiscoveryRuleStatementUpdater.java | 4 +-
.../DropDatabaseDiscoveryRuleStatementUpdater.java | 4 +-
...ere.infra.distsql.update.RuleDefinitionUpdater} | 0
.../update/AlterEncryptRuleStatementUpdater.java | 4 +-
.../update/CreateEncryptRuleStatementUpdater.java | 4 +-
.../update/DropEncryptRuleStatementUpdater.java | 4 +-
...ere.infra.distsql.update.RuleDefinitionUpdater} | 0
...lterReadwriteSplittingRuleStatementUpdater.java | 4 +-
...eateReadwriteSplittingRuleStatementUpdater.java | 4 +-
...DropReadwriteSplittingRuleStatementUpdater.java | 4 +-
...ere.infra.distsql.update.RuleDefinitionUpdater} | 0
...erShardingBindingTableRuleStatementUpdater.java | 4 +-
...ShardingBroadcastTableRuleStatementUpdater.java | 4 +-
.../AlterShardingTableRuleStatementUpdater.java | 4 +-
...teShardingBindingTableRuleStatementUpdater.java | 4 +-
...ShardingBroadcastTableRuleStatementUpdater.java | 4 +-
.../CreateShardingTableRuleStatementUpdater.java | 4 +-
...opShardingBindingTableRuleStatementUpdater.java | 4 +-
...ShardingBroadcastTableRuleStatementUpdater.java | 4 +-
.../DropShardingTableRuleStatementUpdater.java | 4 +-
...ere.infra.distsql.update.RuleDefinitionUpdater} | 0
...pdater.java => RuleDefinitionAlterUpdater.java} | 4 +-
...dater.java => RuleDefinitionCreateUpdater.java} | 4 +-
...Updater.java => RuleDefinitionDropUpdater.java} | 4 +-
...{RDLUpdater.java => RuleDefinitionUpdater.java} | 4 +-
.../text/distsql/rdl/RDLBackendHandlerFactory.java | 11 ++---
.../AddResourceBackendHandler.java | 2 +-
.../CreateDatabaseBackendHandler.java | 2 +-
.../DropDatabaseBackendHandler.java | 2 +-
.../DropResourceBackendHandler.java | 2 +-
.../RuleDefinitionBackendHandler.java} | 48 +++++++++++-----------
.../AddResourceBackendHandlerTest.java | 2 +-
.../DropDatabaseBackendHandlerTest.java | 2 +-
34 files changed, 80 insertions(+), 79 deletions(-)
diff --git
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/AlterDatabaseDiscoveryRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/AlterDatabaseDis
[...]
index 2ddf53b..f272e00 100644
---
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/AlterDatabaseDiscoveryRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/AlterDatabaseDiscoveryRuleStatementUpdater.java
@@ -29,7 +29,7 @@ import
org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResourceMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -43,7 +43,7 @@ import java.util.stream.Collectors;
/**
* Alter database discovery rule statement updater.
*/
-public final class AlterDatabaseDiscoveryRuleStatementUpdater implements
RDLAlterUpdater<AlterDatabaseDiscoveryRuleStatement,
DatabaseDiscoveryRuleConfiguration> {
+public final class AlterDatabaseDiscoveryRuleStatementUpdater implements
RuleDefinitionAlterUpdater<AlterDatabaseDiscoveryRuleStatement,
DatabaseDiscoveryRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/CreateDatabaseDiscoveryRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/CreateDatabaseD
[...]
index 1ffdcfa..1663f5e 100644
---
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/CreateDatabaseDiscoveryRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/CreateDatabaseDiscoveryRuleStatementUpdater.java
@@ -23,7 +23,7 @@ import
org.apache.shardingsphere.dbdiscovery.distsql.handler.converter.DatabaseD
import
org.apache.shardingsphere.dbdiscovery.distsql.parser.segment.DatabaseDiscoveryRuleSegment;
import
org.apache.shardingsphere.dbdiscovery.distsql.parser.statement.CreateDatabaseDiscoveryRuleStatement;
import org.apache.shardingsphere.dbdiscovery.spi.DatabaseDiscoveryType;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResourceMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
@@ -41,7 +41,7 @@ import java.util.stream.Collectors;
/**
* Create database discovery rule statement updater.
*/
-public final class CreateDatabaseDiscoveryRuleStatementUpdater implements
RDLCreateUpdater<CreateDatabaseDiscoveryRuleStatement,
DatabaseDiscoveryRuleConfiguration> {
+public final class CreateDatabaseDiscoveryRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateDatabaseDiscoveryRuleStatement,
DatabaseDiscoveryRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/DropDatabaseDiscoveryRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/DropDatabaseDisco
[...]
index f42aea0..478475c 100644
---
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/DropDatabaseDiscoveryRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/java/org/apache/shardingsphere/dbdiscovery/distsql/handler/update/DropDatabaseDiscoveryRuleStatementUpdater.java
@@ -21,7 +21,7 @@ import com.google.common.base.Preconditions;
import
org.apache.shardingsphere.dbdiscovery.api.config.DatabaseDiscoveryRuleConfiguration;
import
org.apache.shardingsphere.dbdiscovery.api.config.rule.DatabaseDiscoveryDataSourceRuleConfiguration;
import
org.apache.shardingsphere.dbdiscovery.distsql.parser.statement.DropDatabaseDiscoveryRuleStatement;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
/**
* Drop database discovery rule statement updater.
*/
-public final class DropDatabaseDiscoveryRuleStatementUpdater implements
RDLDropUpdater<DropDatabaseDiscoveryRuleStatement,
DatabaseDiscoveryRuleConfiguration> {
+public final class DropDatabaseDiscoveryRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropDatabaseDiscoveryRuleStatement,
DatabaseDiscoveryRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
DropDatabaseDiscoveryRuleStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
b/shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
similarity index 100%
rename from
shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
rename to
shardingsphere-features/shardingsphere-db-discovery/shardingsphere-db-discovery-distsql/shardingsphere-db-discovery-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
diff --git
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleStatementUpdater.java
index f983ce7..2afae88 100644
---
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/AlterEncryptRuleStatementUpdater.java
@@ -28,7 +28,7 @@ import
org.apache.shardingsphere.infra.config.RuleConfiguration;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -42,7 +42,7 @@ import java.util.stream.Collectors;
/**
* Alter encrypt rule statement updater.
*/
-public final class AlterEncryptRuleStatementUpdater implements
RDLAlterUpdater<AlterEncryptRuleStatement, EncryptRuleConfiguration> {
+public final class AlterEncryptRuleStatementUpdater implements
RuleDefinitionAlterUpdater<AlterEncryptRuleStatement, EncryptRuleConfiguration>
{
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/CreateEncryptRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/CreateEncryptRuleStatementUpdater.java
index eac873d..dba9886 100644
---
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/CreateEncryptRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/CreateEncryptRuleStatementUpdater.java
@@ -23,7 +23,7 @@ import
org.apache.shardingsphere.encrypt.distsql.handler.converter.EncryptRuleSt
import
org.apache.shardingsphere.encrypt.distsql.parser.segment.EncryptRuleSegment;
import
org.apache.shardingsphere.encrypt.distsql.parser.statement.CreateEncryptRuleStatement;
import org.apache.shardingsphere.encrypt.spi.EncryptAlgorithm;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
@@ -39,7 +39,7 @@ import java.util.stream.Collectors;
/**
* Create encrypt rule statement updater.
*/
-public final class CreateEncryptRuleStatementUpdater implements
RDLCreateUpdater<CreateEncryptRuleStatement, EncryptRuleConfiguration> {
+public final class CreateEncryptRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateEncryptRuleStatement,
EncryptRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdater.java
index 64c2ccb..c371ebf 100644
---
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/java/org/apache/shardingsphere/encrypt/distsql/handler/update/DropEncryptRuleStatementUpdater.java
@@ -21,7 +21,7 @@ import com.google.common.base.Preconditions;
import org.apache.shardingsphere.encrypt.api.config.EncryptRuleConfiguration;
import
org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfiguration;
import
org.apache.shardingsphere.encrypt.distsql.parser.statement.DropEncryptRuleStatement;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
/**
* Drop encrypt rule statement updater.
*/
-public final class DropEncryptRuleStatementUpdater implements
RDLDropUpdater<DropEncryptRuleStatement, EncryptRuleConfiguration> {
+public final class DropEncryptRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropEncryptRuleStatement, EncryptRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
DropEncryptRuleStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
b/shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
similarity index 100%
rename from
shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
rename to
shardingsphere-features/shardingsphere-encrypt/shardingsphere-encrypt-distsql/shardingsphere-encrypt-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
diff --git
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/r
[...]
index 034a7dc..a6cb975 100644
---
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/AlterReadwriteSplittingRuleStatementUpdater.java
@@ -24,7 +24,7 @@ import
org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResourceMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -44,7 +44,7 @@ import java.util.stream.Collectors;
/**
* Alter readwrite-splitting rule statement updater.
*/
-public final class AlterReadwriteSplittingRuleStatementUpdater implements
RDLAlterUpdater<AlterReadwriteSplittingRuleStatement,
ReadwriteSplittingRuleConfiguration> {
+public final class AlterReadwriteSplittingRuleStatementUpdater implements
RuleDefinitionAlterUpdater<AlterReadwriteSplittingRuleStatement,
ReadwriteSplittingRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/CreateReadwriteSplittingRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/
[...]
index 23146cc..27c0f49 100644
---
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/CreateReadwriteSplittingRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/CreateReadwriteSplittingRuleStatementUpdater.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.readwritesplitting.distsql.handler.update;
import com.google.common.base.Strings;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResourceMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
@@ -41,7 +41,7 @@ import java.util.stream.Collectors;
/**
* Create readwrite-splitting rule statement updater.
*/
-public final class CreateReadwriteSplittingRuleStatementUpdater implements
RDLCreateUpdater<CreateReadwriteSplittingRuleStatement,
ReadwriteSplittingRuleConfiguration> {
+public final class CreateReadwriteSplittingRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateReadwriteSplittingRuleStatement,
ReadwriteSplittingRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/re
[...]
index 53628ee..3cc40e3 100644
---
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/java/org/apache/shardingsphere/readwritesplitting/distsql/handler/update/DropReadwriteSplittingRuleStatementUpdater.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.readwritesplitting.distsql.handler.update;
import com.google.common.base.Preconditions;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
@@ -33,7 +33,7 @@ import java.util.stream.Collectors;
/**
* Drop readwrite-splitting rule statement updater.
*/
-public final class DropReadwriteSplittingRuleStatementUpdater implements
RDLDropUpdater<DropReadwriteSplittingRuleStatement,
ReadwriteSplittingRuleConfiguration> {
+public final class DropReadwriteSplittingRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropReadwriteSplittingRuleStatement,
ReadwriteSplittingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
DropReadwriteSplittingRuleStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
b/shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.
[...]
similarity index 100%
rename from
shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
rename to
shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-distsql/shardingsphere-readwrite-splitting-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBindingTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBindingTableRuleStatementUpdater.java
index 2d98c9e..57f617d 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBindingTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBindingTableRuleStatementUpdater.java
@@ -21,7 +21,7 @@ import
org.apache.shardingsphere.infra.config.RuleConfiguration;
import
org.apache.shardingsphere.infra.distsql.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import
org.apache.shardingsphere.sharding.api.config.rule.ShardingAutoTableRuleConfiguration;
@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
/**
* Alter sharding binding table rule statement updater.
*/
-public final class AlterShardingBindingTableRuleStatementUpdater implements
RDLAlterUpdater<AlterShardingBindingTableRulesStatement,
ShardingRuleConfiguration> {
+public final class AlterShardingBindingTableRuleStatementUpdater implements
RuleDefinitionAlterUpdater<AlterShardingBindingTableRulesStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
AlterShardingBindingTableRulesStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBroadcastTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBroadcastTableRuleStatementU
[...]
index b85c168..dcac0ba 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBroadcastTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingBroadcastTableRuleStatementUpdater.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.sharding.distsql.handler.update;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import
org.apache.shardingsphere.sharding.distsql.parser.statement.AlterShardingBroadcastTableRulesStatement;
@@ -27,7 +27,7 @@ import
org.apache.shardingsphere.sharding.distsql.parser.statement.AlterSharding
/**
* Alter sharding broadcast table rule statement updater.
*/
-public final class AlterShardingBroadcastTableRuleStatementUpdater implements
RDLAlterUpdater<AlterShardingBroadcastTableRulesStatement,
ShardingRuleConfiguration> {
+public final class AlterShardingBroadcastTableRuleStatementUpdater implements
RuleDefinitionAlterUpdater<AlterShardingBroadcastTableRulesStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
AlterShardingBroadcastTableRulesStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableRuleStatementUpdater.java
index d3b81bc..796a8b0 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/AlterShardingTableRuleStatementUpdater.java
@@ -23,7 +23,7 @@ import
org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResour
import
org.apache.shardingsphere.infra.distsql.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -47,7 +47,7 @@ import java.util.stream.Collectors;
/**
* Alter sharding table rule statement updater.
*/
-public final class AlterShardingTableRuleStatementUpdater implements
RDLAlterUpdater<AlterShardingTableRuleStatement, ShardingRuleConfiguration> {
+public final class AlterShardingTableRuleStatementUpdater implements
RuleDefinitionAlterUpdater<AlterShardingTableRuleStatement,
ShardingRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBindingTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBindingTableRuleStatementUpd
[...]
index 4f6803a..18bf190 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBindingTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBindingTableRuleStatementUpdater.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.sharding.distsql.handler.update;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
@@ -36,7 +36,7 @@ import java.util.stream.Collectors;
/**
* Create sharding binding table rule statement updater.
*/
-public final class CreateShardingBindingTableRuleStatementUpdater implements
RDLCreateUpdater<CreateShardingBindingTableRulesStatement,
ShardingRuleConfiguration> {
+public final class CreateShardingBindingTableRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateShardingBindingTableRulesStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
CreateShardingBindingTableRulesStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBroadcastTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBroadcastTableRuleStatemen
[...]
index d15a924..9bf5832 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBroadcastTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingBroadcastTableRuleStatementUpdater.java
@@ -19,7 +19,7 @@ package
org.apache.shardingsphere.sharding.distsql.handler.update;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleInUsedException;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import
org.apache.shardingsphere.sharding.distsql.parser.statement.CreateShardingBroadcastTableRulesStatement;
@@ -27,7 +27,7 @@ import
org.apache.shardingsphere.sharding.distsql.parser.statement.CreateShardin
/**
* Create sharding broadcast table rule statement updater.
*/
-public final class CreateShardingBroadcastTableRuleStatementUpdater implements
RDLCreateUpdater<CreateShardingBroadcastTableRulesStatement,
ShardingRuleConfiguration> {
+public final class CreateShardingBroadcastTableRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateShardingBroadcastTableRulesStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
CreateShardingBroadcastTableRulesStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
index 8ed1e02..b76e47a 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/CreateShardingTableRuleStatementUpdater.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.sharding.distsql.handler.update;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
import org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
import
org.apache.shardingsphere.infra.distsql.exception.resource.RequiredResourceMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.InvalidAlgorithmConfigurationException;
@@ -47,7 +47,7 @@ import java.util.stream.Collectors;
/**
* Create sharding table rule statement updater.
*/
-public final class CreateShardingTableRuleStatementUpdater implements
RDLCreateUpdater<CreateShardingTableRuleStatement, ShardingRuleConfiguration> {
+public final class CreateShardingTableRuleStatementUpdater implements
RuleDefinitionCreateUpdater<CreateShardingTableRuleStatement,
ShardingRuleConfiguration> {
static {
// TODO consider about register once only
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBindingTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBindingTableRuleStatementUpdater.java
index c6d69c6..da97479 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBindingTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBindingTableRuleStatementUpdater.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.sharding.distsql.handler.update;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
@@ -27,7 +27,7 @@ import
org.apache.shardingsphere.sharding.distsql.parser.statement.DropShardingB
/**
* Drop sharding binding table rule statement updater.
*/
-public final class DropShardingBindingTableRuleStatementUpdater implements
RDLDropUpdater<DropShardingBindingTableRulesStatement,
ShardingRuleConfiguration> {
+public final class DropShardingBindingTableRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropShardingBindingTableRulesStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
DropShardingBindingTableRulesStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBroadcastTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBroadcastTableRuleStatementUpd
[...]
index 17c1006..79bb420 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBroadcastTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingBroadcastTableRuleStatementUpdater.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.sharding.distsql.handler.update;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
import
org.apache.shardingsphere.infra.metadata.resource.ShardingSphereResource;
@@ -27,7 +27,7 @@ import
org.apache.shardingsphere.sharding.distsql.parser.statement.DropShardingB
/**
* Drop sharding broadcast table rule statement updater.
*/
-public final class DropShardingBroadcastTableRuleStatementUpdater implements
RDLDropUpdater<DropShardingBroadcastTableRulesStatement,
ShardingRuleConfiguration> {
+public final class DropShardingBroadcastTableRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropShardingBroadcastTableRulesStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
DropShardingBroadcastTableRulesStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleStatementUpdater.java
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleStatementUpdater.java
index 2b3b3ef..bca2b1a 100644
---
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleStatementUpdater.java
+++
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/java/org/apache/shardingsphere/sharding/distsql/handler/update/DropShardingTableRuleStatementUpdater.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.sharding.distsql.handler.update;
import com.google.common.base.Splitter;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
import
org.apache.shardingsphere.infra.distsql.exception.rule.DuplicateRuleException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RequiredRuleMissedException;
import
org.apache.shardingsphere.infra.distsql.exception.rule.RuleDefinitionViolationException;
@@ -37,7 +37,7 @@ import java.util.stream.Collectors;
/**
* Drop sharding table rule statement updater.
*/
-public final class DropShardingTableRuleStatementUpdater implements
RDLDropUpdater<DropShardingTableRuleStatement, ShardingRuleConfiguration> {
+public final class DropShardingTableRuleStatementUpdater implements
RuleDefinitionDropUpdater<DropShardingTableRuleStatement,
ShardingRuleConfiguration> {
@Override
public void checkSQLStatement(final String schemaName, final
DropShardingTableRuleStatement sqlStatement,
diff --git
a/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
b/shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
similarity index 100%
rename from
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RDLUpdater
rename to
shardingsphere-features/shardingsphere-sharding/shardingsphere-sharding-distsql/shardingsphere-sharding-distsql-handler/src/main/resources/META-INF/services/org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLAlterUpdater.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionAlterUpdater.java
similarity index 90%
rename from
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLAlterUpdater.java
rename to
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionAlterUpdater.java
index b668a69..8b29657 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLAlterUpdater.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionAlterUpdater.java
@@ -21,12 +21,12 @@ import
org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
/**
- * Alter rule RDL updater.
+ * Alter rule rule definition updater.
*
* @param <T> type of SQL statement
* @param <R> type of rule configuration
*/
-public interface RDLAlterUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends RDLUpdater<T, R> {
+public interface RuleDefinitionAlterUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends RuleDefinitionUpdater<T, R> {
/**
* Build to be altered rule configuration.
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLCreateUpdater.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionCreateUpdater.java
similarity index 90%
rename from
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLCreateUpdater.java
rename to
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionCreateUpdater.java
index f29023d..0e7be41 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLCreateUpdater.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionCreateUpdater.java
@@ -21,12 +21,12 @@ import
org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
/**
- * Create rule RDL updater.
+ * Create rule rule definition updater.
*
* @param <T> type of SQL statement
* @param <R> type of rule configuration
*/
-public interface RDLCreateUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends RDLUpdater<T, R> {
+public interface RuleDefinitionCreateUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends RuleDefinitionUpdater<T, R> {
/**
* Build to be created rule configuration.
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLDropUpdater.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionDropUpdater.java
similarity index 89%
rename from
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLDropUpdater.java
rename to
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionDropUpdater.java
index 0be2b26..e2baf52 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLDropUpdater.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionDropUpdater.java
@@ -21,12 +21,12 @@ import
org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
/**
- * Drop rule RDL updater.
+ * Drop rule rule definition updater.
*
* @param <T> type of SQL statement
* @param <R> type of rule configuration
*/
-public interface RDLDropUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends RDLUpdater<T, R> {
+public interface RuleDefinitionDropUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends RuleDefinitionUpdater<T, R> {
/**
* Update current rule configuration.
diff --git
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLUpdater.java
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionUpdater.java
similarity index 93%
rename from
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLUpdater.java
rename to
shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionUpdater.java
index 735707a..9f2c886 100644
---
a/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RDLUpdater.java
+++
b/shardingsphere-infra/shardingsphere-infra-common/src/main/java/org/apache/shardingsphere/infra/distsql/update/RuleDefinitionUpdater.java
@@ -24,12 +24,12 @@ import org.apache.shardingsphere.infra.spi.typed.TypedSPI;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
/**
- * RDL updater.
+ * Rule definition updater.
*
* @param <T> type of SQL statement
* @param <R> type of rule configuration
*/
-public interface RDLUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends TypedSPI {
+public interface RuleDefinitionUpdater<T extends SQLStatement, R extends
RuleConfiguration> extends TypedSPI {
/**
* Check SQL statement.
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
index d03a857..bdb4a94 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandlerFactory.java
@@ -26,10 +26,11 @@ import
org.apache.shardingsphere.infra.database.type.DatabaseType;
import
org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;
import org.apache.shardingsphere.proxy.backend.context.ProxyContext;
import org.apache.shardingsphere.proxy.backend.text.TextProtocolBackendHandler;
-import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl.AddResourceBackendHandler;
-import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl.CreateDatabaseBackendHandler;
-import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl.DropDatabaseBackendHandler;
-import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl.DropResourceBackendHandler;
+import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.AddResourceBackendHandler;
+import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.CreateDatabaseBackendHandler;
+import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.DropDatabaseBackendHandler;
+import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource.DropResourceBackendHandler;
+import
org.apache.shardingsphere.proxy.backend.text.distsql.rdl.rule.RuleDefinitionBackendHandler;
import org.apache.shardingsphere.sql.parser.sql.common.statement.SQLStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.CreateDatabaseStatement;
import
org.apache.shardingsphere.sql.parser.sql.common.statement.ddl.DropDatabaseStatement;
@@ -76,6 +77,6 @@ public final class RDLBackendHandlerFactory {
if (sqlStatement instanceof DropDatabaseStatement) {
return new DropDatabaseBackendHandler((DropDatabaseStatement)
sqlStatement, backendConnection);
}
- return new RDLBackendHandler<>(sqlStatement, backendConnection);
+ return new RuleDefinitionBackendHandler<>(sqlStatement,
backendConnection);
}
}
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AddResourceBackendHandler.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/AddResourceBackendHandler.java
similarity index 99%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AddResourceBackendHandler.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/AddResourceBackendHandler.java
index a4927a7..3d7b8b3 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AddResourceBackendHandler.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/AddResourceBackendHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource;
import org.apache.shardingsphere.distsql.parser.segment.DataSourceSegment;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.create.AddResourceStatement;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseBackendHandler.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/CreateDatabaseBackendHandler.java
similarity index 99%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseBackendHandler.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/CreateDatabaseBackendHandler.java
index 73c260b..1a6a299 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/CreateDatabaseBackendHandler.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/CreateDatabaseBackendHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource;
import lombok.RequiredArgsConstructor;
import
org.apache.shardingsphere.governance.core.registry.metadata.event.DatabaseCreatedSQLNotificationEvent;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandler.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropDatabaseBackendHandler.java
similarity index 99%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandler.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropDatabaseBackendHandler.java
index 3d864d6..8a8795a 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandler.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropDatabaseBackendHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource;
import com.google.common.base.Strings;
import lombok.RequiredArgsConstructor;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropResourceBackendHandler.java
similarity index 99%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropResourceBackendHandler.java
index 5512588..7788d5e 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropResourceBackendHandler.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropResourceBackendHandler.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.drop.DropResourceStatement;
import
org.apache.shardingsphere.governance.core.registry.config.event.datasource.DataSourceDroppedSQLNotificationEvent;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandler.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/rule/RuleDefinitionBackendHandler.java
similarity index 66%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandler.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/rule/RuleDefinitionBackendHandler.java
index a613da5..161aeda 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/RDLBackendHandler.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/rule/RuleDefinitionBackendHandler.java
@@ -15,15 +15,15 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.rule;
import
org.apache.shardingsphere.governance.core.registry.config.event.rule.RuleConfigurationsAlteredSQLNotificationEvent;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.infra.distsql.exception.DistSQLException;
-import org.apache.shardingsphere.infra.distsql.update.RDLAlterUpdater;
-import org.apache.shardingsphere.infra.distsql.update.RDLCreateUpdater;
-import org.apache.shardingsphere.infra.distsql.update.RDLDropUpdater;
-import org.apache.shardingsphere.infra.distsql.update.RDLUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionAlterUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionCreateUpdater;
+import
org.apache.shardingsphere.infra.distsql.update.RuleDefinitionDropUpdater;
+import org.apache.shardingsphere.infra.distsql.update.RuleDefinitionUpdater;
import org.apache.shardingsphere.infra.eventbus.ShardingSphereEventBus;
import org.apache.shardingsphere.infra.spi.ShardingSphereServiceLoader;
import org.apache.shardingsphere.infra.spi.typed.TypedSPIRegistry;
@@ -38,28 +38,28 @@ import java.util.Optional;
import java.util.Properties;
/**
- * RDL backend handler.
+ * Rule definition backend handler.
*
* @param <T> type of SQL statement
*/
-public final class RDLBackendHandler<T extends SQLStatement> extends
SchemaRequiredBackendHandler<T> {
+public final class RuleDefinitionBackendHandler<T extends SQLStatement>
extends SchemaRequiredBackendHandler<T> {
static {
- ShardingSphereServiceLoader.register(RDLUpdater.class);
+ ShardingSphereServiceLoader.register(RuleDefinitionUpdater.class);
}
- public RDLBackendHandler(final T sqlStatement, final BackendConnection
backendConnection) {
+ public RuleDefinitionBackendHandler(final T sqlStatement, final
BackendConnection backendConnection) {
super(sqlStatement, backendConnection);
}
@SuppressWarnings({"rawtypes", "unchecked"})
@Override
protected ResponseHeader execute(final String schemaName, final T
sqlStatement) throws DistSQLException {
- RDLUpdater rdlUpdater =
TypedSPIRegistry.getRegisteredService(RDLUpdater.class,
sqlStatement.getClass().getCanonicalName(), new Properties());
- Class<? extends RuleConfiguration> ruleConfigClass =
rdlUpdater.getRuleConfigurationClass();
+ RuleDefinitionUpdater ruleDefinitionUpdater =
TypedSPIRegistry.getRegisteredService(RuleDefinitionUpdater.class,
sqlStatement.getClass().getCanonicalName(), new Properties());
+ Class<? extends RuleConfiguration> ruleConfigClass =
ruleDefinitionUpdater.getRuleConfigurationClass();
RuleConfiguration currentRuleConfig =
findCurrentRuleConfiguration(schemaName, ruleConfigClass).orElse(null);
- rdlUpdater.checkSQLStatement(schemaName, sqlStatement,
currentRuleConfig,
ProxyContext.getInstance().getMetaData(schemaName).getResource());
- processSQLStatement(schemaName, sqlStatement, rdlUpdater,
currentRuleConfig);
+ ruleDefinitionUpdater.checkSQLStatement(schemaName, sqlStatement,
currentRuleConfig,
ProxyContext.getInstance().getMetaData(schemaName).getResource());
+ processSQLStatement(schemaName, sqlStatement, ruleDefinitionUpdater,
currentRuleConfig);
postRuleConfigurationChange(schemaName);
return new UpdateResponseHeader(sqlStatement);
}
@@ -74,20 +74,20 @@ public final class RDLBackendHandler<T extends
SQLStatement> extends SchemaRequi
}
@SuppressWarnings("rawtypes")
- private void processSQLStatement(final String schemaName, final T
sqlStatement, final RDLUpdater updater, final RuleConfiguration
currentRuleConfig) {
- if (updater instanceof RDLCreateUpdater) {
- processCreate(schemaName, sqlStatement, (RDLCreateUpdater)
updater, currentRuleConfig);
- } else if (updater instanceof RDLAlterUpdater) {
- processAlter(sqlStatement, (RDLAlterUpdater) updater,
currentRuleConfig);
- } else if (updater instanceof RDLDropUpdater) {
- processDrop(schemaName, sqlStatement, (RDLDropUpdater) updater,
currentRuleConfig);
+ private void processSQLStatement(final String schemaName, final T
sqlStatement, final RuleDefinitionUpdater updater, final RuleConfiguration
currentRuleConfig) {
+ if (updater instanceof RuleDefinitionCreateUpdater) {
+ processCreate(schemaName, sqlStatement,
(RuleDefinitionCreateUpdater) updater, currentRuleConfig);
+ } else if (updater instanceof RuleDefinitionAlterUpdater) {
+ processAlter(sqlStatement, (RuleDefinitionAlterUpdater) updater,
currentRuleConfig);
+ } else if (updater instanceof RuleDefinitionDropUpdater) {
+ processDrop(schemaName, sqlStatement, (RuleDefinitionDropUpdater)
updater, currentRuleConfig);
} else {
throw new UnsupportedOperationException(String.format("Cannot
support RDL updater type `%s`", updater.getClass().getCanonicalName()));
}
}
@SuppressWarnings({"rawtypes", "unchecked"})
- private void processCreate(final String schemaName, final T sqlStatement,
final RDLCreateUpdater updater, final RuleConfiguration currentRuleConfig) {
+ private void processCreate(final String schemaName, final T sqlStatement,
final RuleDefinitionCreateUpdater updater, final RuleConfiguration
currentRuleConfig) {
RuleConfiguration toBeCreatedRuleConfig =
updater.buildToBeCreatedRuleConfiguration(sqlStatement);
if (null == currentRuleConfig) {
ProxyContext.getInstance().getMetaData(schemaName).getRuleMetaData().getConfigurations().add(toBeCreatedRuleConfig);
@@ -97,14 +97,14 @@ public final class RDLBackendHandler<T extends
SQLStatement> extends SchemaRequi
}
@SuppressWarnings({"rawtypes", "unchecked"})
- private void processAlter(final T sqlStatement, final RDLAlterUpdater
updater, final RuleConfiguration currentRuleConfig) {
+ private void processAlter(final T sqlStatement, final
RuleDefinitionAlterUpdater updater, final RuleConfiguration currentRuleConfig) {
RuleConfiguration toBeAlteredRuleConfig =
updater.buildToBeAlteredRuleConfiguration(sqlStatement);
updater.updateCurrentRuleConfiguration(toBeAlteredRuleConfig,
currentRuleConfig);
}
@SuppressWarnings({"rawtypes", "unchecked"})
- private void processDrop(final String schemaName, final T sqlStatement,
final RDLDropUpdater rdlUpdater, final RuleConfiguration currentRuleConfig) {
- if (rdlUpdater.updateCurrentRuleConfiguration(sqlStatement,
currentRuleConfig)) {
+ private void processDrop(final String schemaName, final T sqlStatement,
final RuleDefinitionDropUpdater updater, final RuleConfiguration
currentRuleConfig) {
+ if (updater.updateCurrentRuleConfiguration(sqlStatement,
currentRuleConfig)) {
ProxyContext.getInstance().getMetaData(schemaName).getRuleMetaData().getConfigurations().remove(currentRuleConfig);
}
}
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AddResourceBackendHandlerTest.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/AddResourceBackendHandlerTest.java
similarity index 99%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AddResourceBackendHandlerTest.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/AddResourceBackendHandlerTest.java
index 2f41d23..016ebf6 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/AddResourceBackendHandlerTest.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/AddResourceBackendHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource;
import org.apache.shardingsphere.distsql.parser.segment.DataSourceSegment;
import
org.apache.shardingsphere.distsql.parser.statement.rdl.create.AddResourceStatement;
diff --git
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropDatabaseBackendHandlerTest.java
similarity index 99%
rename from
shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java
rename to
shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropDatabaseBackendHandlerTest.java
index 8a4d377..11d472d 100644
---
a/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/impl/DropDatabaseBackendHandlerTest.java
+++
b/shardingsphere-proxy/shardingsphere-proxy-backend/src/test/java/org/apache/shardingsphere/proxy/backend/text/distsql/rdl/resource/DropDatabaseBackendHandlerTest.java
@@ -15,7 +15,7 @@
* limitations under the License.
*/
-package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.impl;
+package org.apache.shardingsphere.proxy.backend.text.distsql.rdl.resource;
import org.apache.shardingsphere.infra.context.metadata.MetaDataContexts;
import
org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection;