From 49ab3972cd5c6ba61d7b94ebecfdb30a94cd8bf4 Mon Sep 17 00:00:00 2001 From: "Juan Pan(Trista)" Date: Tue, 2 Jun 2020 12:27:53 +0800 Subject: [PATCH] Rename to SchemaContextsAware (#5880) --- .../core/schema/OrchestrationSchemaContexts.java | 4 ++-- .../shardingsphere/kernel/context/SchemaContexts.java | 2 +- .../{SchemaContextsQuery.java => SchemaContextsAware.java} | 4 ++-- .../proxy/backend/schema/ProxySchemaContexts.java | 6 +++--- .../java/org/apache/shardingsphere/proxy/Bootstrap.java | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) rename shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/{SchemaContextsQuery.java => SchemaContextsAware.java} (95%) diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-schema/src/main/java/org/apache/shardingsphere/orchestration/core/schema/OrchestrationSchemaContexts.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-schema/src/main/java/org/apache/shardingsphere/orchestration/core/schema/OrchestrationSchemaContexts.java index 44d22a86f2..72c22a5431 100644 --- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-schema/src/main/java/org/apache/shardingsphere/orchestration/core/schema/OrchestrationSchemaContexts.java +++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-schema/src/main/java/org/apache/shardingsphere/orchestration/core/schema/OrchestrationSchemaContexts.java @@ -35,7 +35,7 @@ import org.apache.shardingsphere.infra.rule.event.impl.DataSourceNameDisabledEve import org.apache.shardingsphere.kernel.context.SchemaContext; import org.apache.shardingsphere.kernel.context.SchemaContexts; import org.apache.shardingsphere.kernel.context.SchemaContextsBuilder; -import org.apache.shardingsphere.kernel.context.SchemaContextsQuery; +import org.apache.shardingsphere.kernel.context.SchemaContextsAware; import org.apache.shardingsphere.kernel.context.runtime.RuntimeContext; import org.apache.shardingsphere.kernel.context.schema.DataSourceParameter; import org.apache.shardingsphere.kernel.context.schema.ShardingSphereSchema; @@ -64,7 +64,7 @@ import java.util.Map.Entry; * Control panel subscriber. * */ -public abstract class OrchestrationSchemaContexts implements SchemaContextsQuery { +public abstract class OrchestrationSchemaContexts implements SchemaContextsAware { private volatile SchemaContexts schemaContexts; diff --git a/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts.java b/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts.java index 404884ca34..b7275a73e9 100644 --- a/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts.java +++ b/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts.java @@ -27,7 +27,7 @@ import java.util.Map; import java.util.Properties; @Getter -public final class SchemaContexts implements SchemaContextsQuery { +public final class SchemaContexts implements SchemaContextsAware { private final Map schemaContexts = new HashMap<>(); diff --git a/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsQuery.java b/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsAware.java similarity index 95% rename from shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsQuery.java rename to shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsAware.java index 65bf546eab..286dbfba3c 100644 --- a/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsQuery.java +++ b/shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsAware.java @@ -23,10 +23,10 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties import java.util.Map; /** - * Schema contexts query. + * Schema contexts aware. * */ -public interface SchemaContextsQuery extends AutoCloseable { +public interface SchemaContextsAware extends AutoCloseable { /** * Get schema contexts. diff --git a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContexts.java b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContexts.java index 89af321856..16a8181f7b 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContexts.java +++ b/shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContexts.java @@ -25,7 +25,7 @@ import org.apache.shardingsphere.cluster.heartbeat.eventbus.HeartbeatEventBus; import org.apache.shardingsphere.infra.executor.sql.ConnectionMode; import org.apache.shardingsphere.kernel.context.SchemaContext; import org.apache.shardingsphere.kernel.context.SchemaContexts; -import org.apache.shardingsphere.kernel.context.SchemaContextsQuery; +import org.apache.shardingsphere.kernel.context.SchemaContextsAware; import org.apache.shardingsphere.proxy.backend.BackendDataSource; import org.apache.shardingsphere.proxy.backend.cluster.HeartbeatHandler; import org.apache.shardingsphere.transaction.core.TransactionType; @@ -49,7 +49,7 @@ public final class ProxySchemaContexts { private static final ProxySchemaContexts INSTANCE = new ProxySchemaContexts(); - private SchemaContextsQuery schemaContexts = new SchemaContexts(); + private SchemaContextsAware schemaContexts = new SchemaContexts(); private final JDBCBackendDataSource backendDataSource = new JDBCBackendDataSource(); @@ -71,7 +71,7 @@ public final class ProxySchemaContexts { * * @param schemaContexts schema contexts */ - public void init(final SchemaContextsQuery schemaContexts) { + public void init(final SchemaContextsAware schemaContexts) { this.schemaContexts = schemaContexts; } diff --git a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java index a4f80d5aa2..dcb74f65ff 100644 --- a/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java +++ b/shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java @@ -38,7 +38,7 @@ import org.apache.shardingsphere.infra.yaml.config.YamlRootRuleConfigurations; import org.apache.shardingsphere.infra.yaml.config.YamlRuleConfiguration; import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine; import org.apache.shardingsphere.kernel.context.SchemaContextsBuilder; -import org.apache.shardingsphere.kernel.context.SchemaContextsQuery; +import org.apache.shardingsphere.kernel.context.SchemaContextsAware; import org.apache.shardingsphere.kernel.context.schema.DataSourceParameter; import org.apache.shardingsphere.metrics.configuration.swapper.MetricsConfigurationYamlSwapper; import org.apache.shardingsphere.metrics.configuration.yaml.YamlMetricsConfiguration; @@ -161,7 +161,7 @@ public final class Bootstrap { JDBCDriverURLRecognizerEngine.getJDBCDriverURLRecognizer(schemaDataSources.values().iterator().next().values().iterator().next().getUrl()).getDatabaseType()); SchemaContextsBuilder schemaContextsBuilder = new SchemaContextsBuilder(createDataSourcesMap(schemaDataSources), schemaDataSources, authentication, databaseType, schemaRules, properties); - SchemaContextsQuery schemaContexts = isOrchestration ? new ProxyOrchestrationSchemaContexts(schemaContextsBuilder.build()) : schemaContextsBuilder.build(); + SchemaContextsAware schemaContexts = isOrchestration ? new ProxyOrchestrationSchemaContexts(schemaContextsBuilder.build()) : schemaContextsBuilder.build(); ProxySchemaContexts.getInstance().init(schemaContexts); } -- GitLab