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 44d22a86f2dfa32fbe9cf253b781a53f915b7072..72c22a54314dde6e2fbf9c62cfc398876e99b5f0 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 404884ca34c7e89ce089c6d0505f65cb3a6683fd..b7275a73e9e4739f197023515cdc8cbf46ae80d7 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 65bf546eab1a38bd3cdb5f91f45e5fcc65114061..286dbfba3c4780188ac6653b37911bb096c9f4db 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 89af321856c436bc260f85bfa23286deb1a8d1a1..16a8181f7b63c0a333caa4d4dece9108fa82734b 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 a4f80d5aa28234a6cfdb180f41c6bd9462a3a281..dcb74f65ff909a40dd03de361d55e4c04f826278 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); }