Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
apache
Shardingsphere
提交
49ab3972
Shardingsphere
项目概览
apache
/
Shardingsphere
通知
56
Star
3
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Shardingsphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
49ab3972
编写于
6月 02, 2020
作者:
J
Juan Pan(Trista)
提交者:
GitHub
6月 02, 2020
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename to SchemaContextsAware (#5880)
上级
fbb27602
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
10 addition
and
10 deletion
+10
-10
shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-schema/src/main/java/org/apache/shardingsphere/orchestration/core/schema/OrchestrationSchemaContexts.java
...rchestration/core/schema/OrchestrationSchemaContexts.java
+2
-2
shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts.java
.../apache/shardingsphere/kernel/context/SchemaContexts.java
+1
-1
shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContextsAware.java
...he/shardingsphere/kernel/context/SchemaContextsAware.java
+2
-2
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContexts.java
...rdingsphere/proxy/backend/schema/ProxySchemaContexts.java
+3
-3
shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java
.../main/java/org/apache/shardingsphere/proxy/Bootstrap.java
+2
-2
未找到文件。
shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-schema/src/main/java/org/apache/shardingsphere/orchestration/core/schema/OrchestrationSchemaContexts.java
浏览文件 @
49ab3972
...
@@ -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.SchemaContexts
Query
;
import
org.apache.shardingsphere.kernel.context.SchemaContexts
Aware
;
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
SchemaContexts
Query
{
public
abstract
class
OrchestrationSchemaContexts
implements
SchemaContexts
Aware
{
private
volatile
SchemaContexts
schemaContexts
;
private
volatile
SchemaContexts
schemaContexts
;
...
...
shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts.java
浏览文件 @
49ab3972
...
@@ -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
SchemaContexts
Query
{
public
final
class
SchemaContexts
implements
SchemaContexts
Aware
{
private
final
Map
<
String
,
SchemaContext
>
schemaContexts
=
new
HashMap
<>();
private
final
Map
<
String
,
SchemaContext
>
schemaContexts
=
new
HashMap
<>();
...
...
shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts
Query
.java
→
shardingsphere-kernel/shardingsphere-kernel-context/src/main/java/org/apache/shardingsphere/kernel/context/SchemaContexts
Aware
.java
浏览文件 @
49ab3972
...
@@ -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
SchemaContexts
Query
extends
AutoCloseable
{
public
interface
SchemaContexts
Aware
extends
AutoCloseable
{
/**
/**
* Get schema contexts.
* Get schema contexts.
...
...
shardingsphere-proxy/shardingsphere-proxy-backend/src/main/java/org/apache/shardingsphere/proxy/backend/schema/ProxySchemaContexts.java
浏览文件 @
49ab3972
...
@@ -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.SchemaContexts
Query
;
import
org.apache.shardingsphere.kernel.context.SchemaContexts
Aware
;
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
SchemaContexts
Query
schemaContexts
=
new
SchemaContexts
();
private
SchemaContexts
Aware
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
SchemaContexts
Query
schemaContexts
)
{
public
void
init
(
final
SchemaContexts
Aware
schemaContexts
)
{
this
.
schemaContexts
=
schemaContexts
;
this
.
schemaContexts
=
schemaContexts
;
}
}
...
...
shardingsphere-proxy/shardingsphere-proxy-bootstrap/src/main/java/org/apache/shardingsphere/proxy/Bootstrap.java
浏览文件 @
49ab3972
...
@@ -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.SchemaContexts
Query
;
import
org.apache.shardingsphere.kernel.context.SchemaContexts
Aware
;
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
);
SchemaContexts
Query
schemaContexts
=
isOrchestration
?
new
ProxyOrchestrationSchemaContexts
(
schemaContextsBuilder
.
build
())
:
schemaContextsBuilder
.
build
();
SchemaContexts
Aware
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录