未验证 提交 49ab3972 编写于 作者: J Juan Pan(Trista) 提交者: GitHub

Rename to SchemaContextsAware (#5880)

上级 fbb27602
...@@ -35,7 +35,7 @@ import org.apache.shardingsphere.infra.rule.event.impl.DataSourceNameDisabledEve ...@@ -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.SchemaContext;
import org.apache.shardingsphere.kernel.context.SchemaContexts; import org.apache.shardingsphere.kernel.context.SchemaContexts;
import org.apache.shardingsphere.kernel.context.SchemaContextsBuilder; 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.runtime.RuntimeContext;
import org.apache.shardingsphere.kernel.context.schema.DataSourceParameter; import org.apache.shardingsphere.kernel.context.schema.DataSourceParameter;
import org.apache.shardingsphere.kernel.context.schema.ShardingSphereSchema; import org.apache.shardingsphere.kernel.context.schema.ShardingSphereSchema;
...@@ -64,7 +64,7 @@ import java.util.Map.Entry; ...@@ -64,7 +64,7 @@ import java.util.Map.Entry;
* Control panel subscriber. * Control panel subscriber.
* *
*/ */
public abstract class OrchestrationSchemaContexts implements SchemaContextsQuery { public abstract class OrchestrationSchemaContexts implements SchemaContextsAware {
private volatile SchemaContexts schemaContexts; private volatile SchemaContexts schemaContexts;
......
...@@ -27,7 +27,7 @@ import java.util.Map; ...@@ -27,7 +27,7 @@ import java.util.Map;
import java.util.Properties; import java.util.Properties;
@Getter @Getter
public final class SchemaContexts implements SchemaContextsQuery { public final class SchemaContexts implements SchemaContextsAware {
private final Map<String, SchemaContext> schemaContexts = new HashMap<>(); private final Map<String, SchemaContext> schemaContexts = new HashMap<>();
......
...@@ -23,10 +23,10 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties ...@@ -23,10 +23,10 @@ import org.apache.shardingsphere.infra.config.properties.ConfigurationProperties
import java.util.Map; import java.util.Map;
/** /**
* Schema contexts query. * Schema contexts aware.
* *
*/ */
public interface SchemaContextsQuery extends AutoCloseable { public interface SchemaContextsAware extends AutoCloseable {
/** /**
* Get schema contexts. * Get schema contexts.
......
...@@ -25,7 +25,7 @@ import org.apache.shardingsphere.cluster.heartbeat.eventbus.HeartbeatEventBus; ...@@ -25,7 +25,7 @@ import org.apache.shardingsphere.cluster.heartbeat.eventbus.HeartbeatEventBus;
import org.apache.shardingsphere.infra.executor.sql.ConnectionMode; import org.apache.shardingsphere.infra.executor.sql.ConnectionMode;
import org.apache.shardingsphere.kernel.context.SchemaContext; import org.apache.shardingsphere.kernel.context.SchemaContext;
import org.apache.shardingsphere.kernel.context.SchemaContexts; 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.BackendDataSource;
import org.apache.shardingsphere.proxy.backend.cluster.HeartbeatHandler; import org.apache.shardingsphere.proxy.backend.cluster.HeartbeatHandler;
import org.apache.shardingsphere.transaction.core.TransactionType; import org.apache.shardingsphere.transaction.core.TransactionType;
...@@ -49,7 +49,7 @@ public final class ProxySchemaContexts { ...@@ -49,7 +49,7 @@ public final class ProxySchemaContexts {
private static final ProxySchemaContexts INSTANCE = new ProxySchemaContexts(); private static final ProxySchemaContexts INSTANCE = new ProxySchemaContexts();
private SchemaContextsQuery schemaContexts = new SchemaContexts(); private SchemaContextsAware schemaContexts = new SchemaContexts();
private final JDBCBackendDataSource backendDataSource = new JDBCBackendDataSource(); private final JDBCBackendDataSource backendDataSource = new JDBCBackendDataSource();
...@@ -71,7 +71,7 @@ public final class ProxySchemaContexts { ...@@ -71,7 +71,7 @@ public final class ProxySchemaContexts {
* *
* @param schemaContexts schema contexts * @param schemaContexts schema contexts
*/ */
public void init(final SchemaContextsQuery schemaContexts) { public void init(final SchemaContextsAware schemaContexts) {
this.schemaContexts = schemaContexts; this.schemaContexts = schemaContexts;
} }
......
...@@ -38,7 +38,7 @@ import org.apache.shardingsphere.infra.yaml.config.YamlRootRuleConfigurations; ...@@ -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.config.YamlRuleConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine; import org.apache.shardingsphere.infra.yaml.swapper.YamlRuleConfigurationSwapperEngine;
import org.apache.shardingsphere.kernel.context.SchemaContextsBuilder; 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.kernel.context.schema.DataSourceParameter;
import org.apache.shardingsphere.metrics.configuration.swapper.MetricsConfigurationYamlSwapper; import org.apache.shardingsphere.metrics.configuration.swapper.MetricsConfigurationYamlSwapper;
import org.apache.shardingsphere.metrics.configuration.yaml.YamlMetricsConfiguration; import org.apache.shardingsphere.metrics.configuration.yaml.YamlMetricsConfiguration;
...@@ -161,7 +161,7 @@ public final class Bootstrap { ...@@ -161,7 +161,7 @@ public final class Bootstrap {
JDBCDriverURLRecognizerEngine.getJDBCDriverURLRecognizer(schemaDataSources.values().iterator().next().values().iterator().next().getUrl()).getDatabaseType()); JDBCDriverURLRecognizerEngine.getJDBCDriverURLRecognizer(schemaDataSources.values().iterator().next().values().iterator().next().getUrl()).getDatabaseType());
SchemaContextsBuilder schemaContextsBuilder = SchemaContextsBuilder schemaContextsBuilder =
new SchemaContextsBuilder(createDataSourcesMap(schemaDataSources), schemaDataSources, authentication, databaseType, schemaRules, properties); 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); ProxySchemaContexts.getInstance().init(schemaContexts);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册