You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2020/07/25 06:24:48 UTC
[shardingsphere] branch master updated: Rename CenterConfiguration
to OrchestrationRepositoryConfiguration (#6434)
This is an automated email from the ASF dual-hosted git repository.
panjuan 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 ac6da4e Rename CenterConfiguration to OrchestrationRepositoryConfiguration (#6434)
ac6da4e is described below
commit ac6da4ef62f1823bdfe7ccf2f81967e8f34d6add
Author: Liang Zhang <te...@163.com>
AuthorDate: Sat Jul 25 14:24:34 2020 +0800
Rename CenterConfiguration to OrchestrationRepositoryConfiguration (#6434)
* Rename CenterConfiguration to OrchestrationRepositoryConfiguration
* Rervise java doc
---
.../raw/jdbc/JavaConfigurationExampleMain.java | 22 +++++++-------
... OrchestrationRepositoryConfigurationUtil.java} | 32 ++++++++++----------
.../config/cloud/CloudEncryptConfiguration.java | 10 +++----
.../cloud/CloudMasterSlaveConfiguration.java | 10 +++----
.../config/cloud/CloudShadowConfiguration.java | 11 ++++---
...oudShardingDatabasesAndTablesConfiguration.java | 10 +++----
.../config/local/LocalEncryptConfiguration.java | 10 +++----
.../local/LocalMasterSlaveConfiguration.java | 10 +++----
.../config/local/LocalShadowConfiguration.java | 10 +++----
...calShardingDatabasesAndTablesConfiguration.java | 10 +++----
.../local/LocalShardingDatabasesConfiguration.java | 10 +++----
.../LocalShardingMasterSlaveConfiguration.java | 10 +++----
.../local/LocalShardingTablesConfiguration.java | 10 +++----
.../fixture/FirstTestConfigurationRepository.java | 4 +--
.../core/facade/OrchestrationFacade.java | 35 ++++++++++++----------
.../core/facade/OrchestrationFacadeTest.java | 10 +++----
.../fixture/FirstTestConfigurationRepository.java | 4 +--
.../fixture/SecondTestRegistryRepository.java | 4 +--
.../fixture/FirstTestRegistryRepository.java | 4 +--
.../fixture/SecondTestRegistryRepository.java | 4 +--
.../repository/api/OrchestrationRepository.java | 4 +--
.../api/config/OrchestrationConfiguration.java | 2 +-
...a => OrchestrationRepositoryConfiguration.java} | 6 ++--
.../api/exception/OrchestrationException.java | 2 +-
.../api/config/OrchestrationConfigurationTest.java | 2 +-
... OrchestrationRepositoryConfigurationTest.java} | 12 ++++----
.../api/fixture/FirstTestRepository.java | 4 +--
.../OrchestrationConfigurationYamlSwapper.java | 4 +--
...strationRepositoryConfigurationYamlSwapper.java | 10 +++----
.../OrchestrationConfigurationYamlSwapperTest.java | 6 ++--
...tionRepositoryConfigurationYamlSwapperTest.java | 10 +++----
.../repository/apollo/ApolloRepository.java | 4 +--
.../apollo/wrapper/ApolloConfigWrapper.java | 4 +--
.../apollo/wrapper/ApolloOpenApiWrapper.java | 4 +--
.../repository/apollo/ApolloRepositoryTest.java | 4 +--
.../apollo/wrapper/ApolloConfigWrapperTest.java | 4 +--
.../apollo/wrapper/ApolloOpenApiWrapperTest.java | 4 +--
.../repository/etcd/EtcdRepository.java | 4 +--
.../repository/etcd/EtcdRepositoryTest.java | 4 +--
.../repository/nacos/NacosRepository.java | 4 +--
.../repository/nacos/NacosRepositoryTest.java | 4 +--
.../zookeeper/CuratorZookeeperRepository.java | 6 ++--
.../zookeeper/CuratorZookeeperRepositoryTest.java | 14 ++++-----
...strationRepositoryConfigurationSwapperUtil.java | 6 ++--
.../fixture/FirstTestConfigurationRepository.java | 4 +--
.../fixture/FirstTestMetaDataRepository.java | 4 +--
.../fixture/FirstTestRegistryRepository.java | 4 +--
.../fixture/FourthTestConfigurationRepository.java | 4 +--
.../fixture/FourthTestRegistryRepository.java | 4 +--
.../fixture/SecondTestConfigurationRepository.java | 4 +--
.../fixture/SecondTestRegistryRepository.java | 4 +--
.../fixture/ThirdTestConfigurationRepository.java | 4 +--
.../fixture/ThirdTestRegistryRepository.java | 4 +--
.../OrchestrationShardingSphereDataSourceTest.java | 22 +++++++-------
.../YamlInstanceConfigurationSwapperUtilTest.java | 6 ++--
.../OrchestrationSpringBootConfiguration.java | 4 +--
.../registry/TestOrchestrationRepository.java | 4 +--
.../parser/InstanceBeanDefinitionParser.java | 4 +--
.../registry/TestOrchestrationRepository.java | 4 +--
59 files changed, 221 insertions(+), 217 deletions(-)
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/JavaConfigurationExampleMain.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/JavaConfigurationExampleMain.java
index 6d12eec..98544c1 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/JavaConfigurationExampleMain.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/JavaConfigurationExampleMain.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.ExampleExecuteTemplate;
import org.apache.shardingsphere.example.core.api.service.ExampleService;
import org.apache.shardingsphere.example.core.jdbc.service.OrderServiceImpl;
-import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.RegistryCenterConfigurationUtil;
+import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.OrchestrationRepositoryConfigurationUtil;
import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud.CloudEncryptConfiguration;
import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud.CloudMasterSlaveConfiguration;
import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud.CloudShadowConfiguration;
@@ -33,7 +33,7 @@ import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.local.Loc
import org.apache.shardingsphere.example.orchestration.raw.jdbc.config.local.LocalShardingDatabasesAndTablesConfiguration;
import org.apache.shardingsphere.example.type.RegistryCenterType;
import org.apache.shardingsphere.example.type.ShardingType;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import javax.sql.DataSource;
import java.sql.SQLException;
@@ -67,21 +67,23 @@ public class JavaConfigurationExampleMain {
}
private static DataSource getDataSource(final ShardingType shardingType, final boolean loadConfigFromRegCenter) throws SQLException {
- Map<String, CenterConfiguration> centerConfigurationMap = getRegistryCenterConfiguration(registryCenterType, shardingType);
+ Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations = getOrchestrationRepositoryConfigurations(registryCenterType, shardingType);
ExampleConfiguration configuration;
switch (shardingType) {
case SHARDING_DATABASES_AND_TABLES:
configuration = loadConfigFromRegCenter
- ? new CloudShardingDatabasesAndTablesConfiguration(centerConfigurationMap) : new LocalShardingDatabasesAndTablesConfiguration(centerConfigurationMap);
+ ? new CloudShardingDatabasesAndTablesConfiguration(orchestrationRepositoryConfigurations)
+ : new LocalShardingDatabasesAndTablesConfiguration(orchestrationRepositoryConfigurations);
break;
case MASTER_SLAVE:
- configuration = loadConfigFromRegCenter ? new CloudMasterSlaveConfiguration(centerConfigurationMap) : new LocalMasterSlaveConfiguration(centerConfigurationMap);
+ configuration = loadConfigFromRegCenter
+ ? new CloudMasterSlaveConfiguration(orchestrationRepositoryConfigurations) : new LocalMasterSlaveConfiguration(orchestrationRepositoryConfigurations);
break;
case ENCRYPT:
- configuration = loadConfigFromRegCenter ? new CloudEncryptConfiguration(centerConfigurationMap) : new LocalEncryptConfiguration(centerConfigurationMap);
+ configuration = loadConfigFromRegCenter ? new CloudEncryptConfiguration(orchestrationRepositoryConfigurations) : new LocalEncryptConfiguration(orchestrationRepositoryConfigurations);
break;
case SHADOW:
- configuration = loadConfigFromRegCenter ? new CloudShadowConfiguration(centerConfigurationMap) : new LocalShadowConfiguration(centerConfigurationMap);
+ configuration = loadConfigFromRegCenter ? new CloudShadowConfiguration(orchestrationRepositoryConfigurations) : new LocalShadowConfiguration(orchestrationRepositoryConfigurations);
break;
default:
throw new UnsupportedOperationException(shardingType.name());
@@ -89,9 +91,9 @@ public class JavaConfigurationExampleMain {
return configuration.getDataSource();
}
- private static Map<String, CenterConfiguration> getRegistryCenterConfiguration(final RegistryCenterType registryCenterType, final ShardingType shardingType) {
- return RegistryCenterType.ZOOKEEPER == registryCenterType ? RegistryCenterConfigurationUtil.getZooKeeperConfiguration(String.valueOf(!loadConfigFromRegCenter), shardingType)
- : RegistryCenterConfigurationUtil.getNacosConfiguration(String.valueOf(!loadConfigFromRegCenter), shardingType);
+ private static Map<String, OrchestrationRepositoryConfiguration> getOrchestrationRepositoryConfigurations(final RegistryCenterType registryCenterType, final ShardingType shardingType) {
+ return RegistryCenterType.ZOOKEEPER == registryCenterType ? OrchestrationRepositoryConfigurationUtil.getZooKeeperConfiguration(String.valueOf(!loadConfigFromRegCenter), shardingType)
+ : OrchestrationRepositoryConfigurationUtil.getNacosConfiguration(String.valueOf(!loadConfigFromRegCenter), shardingType);
}
private static ExampleService getExampleService(final DataSource dataSource) {
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/RegistryCenterConfigurationUtil.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/OrchestrationRepositoryConfigurationUtil.java
similarity index 70%
rename from examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/RegistryCenterConfigurationUtil.java
rename to examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/OrchestrationRepositoryConfigurationUtil.java
index 37bc978..f410451 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/RegistryCenterConfigurationUtil.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/OrchestrationRepositoryConfigurationUtil.java
@@ -18,13 +18,13 @@
package org.apache.shardingsphere.example.orchestration.raw.jdbc.config;
import org.apache.shardingsphere.example.type.ShardingType;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
-public class RegistryCenterConfigurationUtil {
+public final class OrchestrationRepositoryConfigurationUtil {
private static final String ZOOKEEPER_CONNECTION_STRING = "localhost:2181";
@@ -34,44 +34,44 @@ public class RegistryCenterConfigurationUtil {
private static final String NACOS_NAMESPACE = "";
- public static Map<String, CenterConfiguration> getZooKeeperConfiguration(final String overwrite, final ShardingType shardingType) {
- Map<String, CenterConfiguration> result = new HashMap<>();
+ public static Map<String, OrchestrationRepositoryConfiguration> getZooKeeperConfiguration(final String overwrite, final ShardingType shardingType) {
+ Map<String, OrchestrationRepositoryConfiguration> result = new HashMap<>();
Properties props = new Properties();
props.setProperty("overwrite", overwrite);
- CenterConfiguration centerConfiguration = new CenterConfiguration("zookeeper", props);
- centerConfiguration.setServerLists(ZOOKEEPER_CONNECTION_STRING);
- centerConfiguration.setNamespace(NAMESPACE);
- centerConfiguration.setOrchestrationType("registry_center,config_center,metadata_center");
+ OrchestrationRepositoryConfiguration orchestrationRepositoryConfiguration = new OrchestrationRepositoryConfiguration("zookeeper", props);
+ orchestrationRepositoryConfiguration.setServerLists(ZOOKEEPER_CONNECTION_STRING);
+ orchestrationRepositoryConfiguration.setNamespace(NAMESPACE);
+ orchestrationRepositoryConfiguration.setOrchestrationType("registry_center,config_center,metadata_center");
switch (shardingType) {
case SHARDING_DATABASES_AND_TABLES:
- result.put("orchestration-sharding-data-source", centerConfiguration);
+ result.put("orchestration-sharding-data-source", orchestrationRepositoryConfiguration);
break;
case MASTER_SLAVE:
- result.put("orchestration-ms-data-source", centerConfiguration);
+ result.put("orchestration-ms-data-source", orchestrationRepositoryConfiguration);
break;
case ENCRYPT:
- result.put("orchestration-encrypt-data-source", centerConfiguration);
+ result.put("orchestration-encrypt-data-source", orchestrationRepositoryConfiguration);
break;
case SHADOW:
- result.put("orchestration-shadow-data-source", centerConfiguration);
+ result.put("orchestration-shadow-data-source", orchestrationRepositoryConfiguration);
break;
}
return result;
}
- public static Map<String, CenterConfiguration> getNacosConfiguration(final String overwrite, final ShardingType shardingType) {
- Map<String, CenterConfiguration> result = new HashMap<>();
+ public static Map<String, OrchestrationRepositoryConfiguration> getNacosConfiguration(final String overwrite, final ShardingType shardingType) {
+ Map<String, OrchestrationRepositoryConfiguration> result = new HashMap<>();
Properties nacosProperties = new Properties();
nacosProperties.setProperty("group", "SHARDING_SPHERE_DEFAULT_GROUP");
nacosProperties.setProperty("timeout", "3000");
nacosProperties.setProperty("overwrite", overwrite);
- CenterConfiguration nacosResult = new CenterConfiguration("nacos", nacosProperties);
+ OrchestrationRepositoryConfiguration nacosResult = new OrchestrationRepositoryConfiguration("nacos", nacosProperties);
nacosResult.setServerLists(NACOS_CONNECTION_STRING);
nacosResult.setNamespace(NACOS_NAMESPACE);
nacosResult.setOrchestrationType("config_center");
Properties zookeeperProperties = new Properties();
zookeeperProperties.setProperty("overwrite", overwrite);
- CenterConfiguration zookeeperResult = new CenterConfiguration("zookeeper", zookeeperProperties);
+ OrchestrationRepositoryConfiguration zookeeperResult = new OrchestrationRepositoryConfiguration("zookeeper", zookeeperProperties);
zookeeperResult.setServerLists(ZOOKEEPER_CONNECTION_STRING);
zookeeperResult.setNamespace(NAMESPACE);
zookeeperResult.setOrchestrationType("registry_center,metadata_center");
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudEncryptConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudEncryptConfiguration.java
index ebce5d7..8cdeb1b 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudEncryptConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudEncryptConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud;
import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import javax.sql.DataSource;
@@ -28,14 +28,14 @@ import java.util.Map;
public class CloudEncryptConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public CloudEncryptConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public CloudEncryptConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
public DataSource getDataSource() throws SQLException {
- return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(centerConfigurationMap));
+ return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(orchestrationRepositoryConfigurations));
}
}
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudMasterSlaveConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudMasterSlaveConfiguration.java
index 61a1652..1daa6e5 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudMasterSlaveConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudMasterSlaveConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud;
import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import javax.sql.DataSource;
@@ -28,14 +28,14 @@ import java.util.Map;
public final class CloudMasterSlaveConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public CloudMasterSlaveConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public CloudMasterSlaveConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
public DataSource getDataSource() throws SQLException {
- return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(centerConfigurationMap));
+ return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(orchestrationRepositoryConfigurations));
}
}
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShadowConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShadowConfiguration.java
index 0367801..54bfca0 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShadowConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShadowConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud;
import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import javax.sql.DataSource;
@@ -28,15 +28,14 @@ import java.util.Map;
public class CloudShadowConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public CloudShadowConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public CloudShadowConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
public DataSource getDataSource() throws SQLException {
- return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(centerConfigurationMap));
+ return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(orchestrationRepositoryConfigurations));
}
}
-
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfiguration.java
index 4562057..8eb1c90 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/cloud/CloudShardingDatabasesAndTablesConfiguration.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.cloud;
import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import javax.sql.DataSource;
@@ -28,14 +28,14 @@ import java.util.Map;
public final class CloudShardingDatabasesAndTablesConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public CloudShardingDatabasesAndTablesConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public CloudShardingDatabasesAndTablesConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
public DataSource getDataSource() throws SQLException {
- return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(centerConfigurationMap));
+ return OrchestrationShardingSphereDataSourceFactory.createDataSource(new OrchestrationConfiguration(orchestrationRepositoryConfigurations));
}
}
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java
index 9697dd6..6ce4774 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalEncryptConfiguration.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.encrypt.api.config.rule.EncryptTableRuleConfigu
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import javax.sql.DataSource;
@@ -36,10 +36,10 @@ import java.util.Properties;
public final class LocalEncryptConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalEncryptConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalEncryptConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
@@ -49,7 +49,7 @@ public final class LocalEncryptConfiguration implements ExampleConfiguration {
}
private OrchestrationConfiguration getOrchestrationConfiguration() {
- return new OrchestrationConfiguration(centerConfigurationMap);
+ return new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
}
private EncryptRuleConfiguration getEncryptRuleConfiguration() {
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalMasterSlaveConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalMasterSlaveConfiguration.java
index c21e534..55deede 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalMasterSlaveConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalMasterSlaveConfiguration.java
@@ -22,7 +22,7 @@ import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration;
import org.apache.shardingsphere.masterslave.api.config.rule.MasterSlaveDataSourceRuleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import javax.sql.DataSource;
@@ -35,10 +35,10 @@ import java.util.Properties;
public final class LocalMasterSlaveConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalMasterSlaveConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalMasterSlaveConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
@@ -46,7 +46,7 @@ public final class LocalMasterSlaveConfiguration implements ExampleConfiguration
MasterSlaveDataSourceRuleConfiguration dataSourceConfiguration = new MasterSlaveDataSourceRuleConfiguration(
"demo_ds_master_slave", "demo_ds_master", Arrays.asList("demo_ds_slave_0", "demo_ds_slave_1"), null);
MasterSlaveRuleConfiguration masterSlaveRuleConfig = new MasterSlaveRuleConfiguration(Collections.singleton(dataSourceConfiguration), Collections.emptyMap());
- OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(centerConfigurationMap);
+ OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
return OrchestrationShardingSphereDataSourceFactory.createDataSource(createDataSourceMap(), Collections.singleton(masterSlaveRuleConfig), new Properties(), orchestrationConfig);
}
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShadowConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShadowConfiguration.java
index 0a8113a..3856f15 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShadowConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShadowConfiguration.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.example.orchestration.raw.jdbc.config.local;
import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingSphereDataSourceFactory;
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.shadow.api.config.ShadowRuleConfiguration;
@@ -33,10 +33,10 @@ import java.util.Properties;
public class LocalShadowConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalShadowConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalShadowConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
@@ -53,7 +53,7 @@ public class LocalShadowConfiguration implements ExampleConfiguration {
}
private OrchestrationConfiguration getOrchestrationConfiguration() {
- return new OrchestrationConfiguration(centerConfigurationMap);
+ return new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
}
private ShadowRuleConfiguration getShadowRuleConfiguration() {
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfiguration.java
index c2cfcc6..b69e758 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesAndTablesConfiguration.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingS
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
@@ -37,10 +37,10 @@ import java.util.Properties;
public final class LocalShardingDatabasesAndTablesConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalShardingDatabasesAndTablesConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalShardingDatabasesAndTablesConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
private static KeyGenerateStrategyConfiguration getKeyGeneratorConfiguration() {
@@ -49,7 +49,7 @@ public final class LocalShardingDatabasesAndTablesConfiguration implements Examp
@Override
public DataSource getDataSource() throws SQLException {
- OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(centerConfigurationMap);
+ OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
return OrchestrationShardingSphereDataSourceFactory.createDataSource(createDataSourceMap(), Collections.singleton(createShardingRuleConfiguration()), new Properties(), orchestrationConfig);
}
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java
index 81a7345..e06dd54 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingDatabasesConfiguration.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingS
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
@@ -37,10 +37,10 @@ import java.util.Properties;
public final class LocalShardingDatabasesConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalShardingDatabasesConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalShardingDatabasesConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
private static KeyGenerateStrategyConfiguration getKeyGeneratorConfiguration() {
@@ -49,7 +49,7 @@ public final class LocalShardingDatabasesConfiguration implements ExampleConfigu
@Override
public DataSource getDataSource() throws SQLException {
- OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(centerConfigurationMap);
+ OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
return OrchestrationShardingSphereDataSourceFactory.createDataSource(createDataSourceMap(), Collections.singleton(createShardingRuleConfiguration()), new Properties(), orchestrationConfig);
}
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingMasterSlaveConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingMasterSlaveConfiguration.java
index fefc59d..5b64027 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingMasterSlaveConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingMasterSlaveConfiguration.java
@@ -24,7 +24,7 @@ import org.apache.shardingsphere.infra.config.RuleConfiguration;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration;
import org.apache.shardingsphere.masterslave.api.config.rule.MasterSlaveDataSourceRuleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
@@ -43,15 +43,15 @@ import java.util.Properties;
public final class LocalShardingMasterSlaveConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalShardingMasterSlaveConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalShardingMasterSlaveConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
public DataSource getDataSource() throws SQLException {
- OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(centerConfigurationMap);
+ OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
Collection<RuleConfiguration> configurations = new LinkedList<>();
configurations.add(getShardingRuleConfiguration());
configurations.add(getMasterSlaveRuleConfiguration());
diff --git a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingTablesConfiguration.java b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingTablesConfiguration.java
index efdb725..7ab476f 100644
--- a/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingTablesConfiguration.java
+++ b/examples/shardingsphere-jdbc-example/orchestration-example/orchestration-raw-jdbc-example/src/main/java/org/apache/shardingsphere/example/orchestration/raw/jdbc/config/local/LocalShardingTablesConfiguration.java
@@ -21,7 +21,7 @@ import org.apache.shardingsphere.driver.orchestration.api.OrchestrationShardingS
import org.apache.shardingsphere.example.config.ExampleConfiguration;
import org.apache.shardingsphere.example.core.api.DataSourceUtil;
import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.sharding.api.config.ShardingRuleConfiguration;
import org.apache.shardingsphere.sharding.api.config.rule.ShardingTableRuleConfiguration;
@@ -37,15 +37,15 @@ import java.util.Properties;
public final class LocalShardingTablesConfiguration implements ExampleConfiguration {
- private final Map<String, CenterConfiguration> centerConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations;
- public LocalShardingTablesConfiguration(final Map<String, CenterConfiguration> centerConfigurationMap) {
- this.centerConfigurationMap = centerConfigurationMap;
+ public LocalShardingTablesConfiguration(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations) {
+ this.orchestrationRepositoryConfigurations = orchestrationRepositoryConfigurations;
}
@Override
public DataSource getDataSource() throws SQLException {
- OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(centerConfigurationMap);
+ OrchestrationConfiguration orchestrationConfig = new OrchestrationConfiguration(orchestrationRepositoryConfigurations);
return OrchestrationShardingSphereDataSourceFactory.createDataSource(createDataSourceMap(), Collections.singleton(createShardingRuleConfiguration()), new Properties(), orchestrationConfig);
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-config/src/test/java/org/apache/shardingsphere/orchestration/core/config/fixture/FirstTestConfigurationRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-config/src/test/java/org/apache/shardingsphere/orchestration/core/config/fixture/FirstTestConfigurationRepo [...]
index a9d6372..4777fd7 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-config/src/test/java/org/apache/shardingsphere/orchestration/core/config/fixture/FirstTestConfigurationRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-config/src/test/java/org/apache/shardingsphere/orchestration/core/config/fixture/FirstTestConfigurationRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@ public final class FirstTestConfigurationRepository implements ConfigurationRepo
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/main/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacade.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/main/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacade.java
index 2b4c348..03a1bb2 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/main/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacade.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/main/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacade.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.metrics.configuration.config.MetricsConfigurati
import org.apache.shardingsphere.orchestration.core.registry.RegistryCenter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.orchestration.core.common.CenterType;
import org.apache.shardingsphere.orchestration.core.config.ConfigCenter;
@@ -98,34 +98,37 @@ public final class OrchestrationFacade implements AutoCloseable {
private void initConfigCenter(final OrchestrationConfiguration orchestrationConfig) {
configCenterName = getInstanceName(orchestrationConfig.getInstanceConfigurationMap(), CenterType.CONFIG_CENTER.getValue());
- CenterConfiguration configCenterConfiguration = orchestrationConfig.getInstanceConfigurationMap().get(configCenterName);
- Preconditions.checkNotNull(configCenterConfiguration, "Config center configuration cannot be null.");
- configurationRepository = TypedSPIRegistry.getRegisteredService(ConfigurationRepository.class, configCenterConfiguration.getType(), configCenterConfiguration.getProps());
- configurationRepository.init(configCenterConfiguration);
- isOverwrite = new OrchestrationProperties(configCenterConfiguration.getProps()).getValue(OrchestrationPropertyKey.OVERWRITE);
+ OrchestrationRepositoryConfiguration orchestrationRepositoryConfiguration = orchestrationConfig.getInstanceConfigurationMap().get(configCenterName);
+ Preconditions.checkNotNull(orchestrationRepositoryConfiguration, "Config center configuration cannot be null.");
+ configurationRepository = TypedSPIRegistry.getRegisteredService(
+ ConfigurationRepository.class, orchestrationRepositoryConfiguration.getType(), orchestrationRepositoryConfiguration.getProps());
+ configurationRepository.init(orchestrationRepositoryConfiguration);
+ isOverwrite = new OrchestrationProperties(orchestrationRepositoryConfiguration.getProps()).getValue(OrchestrationPropertyKey.OVERWRITE);
configCenter = new ConfigCenter(configCenterName, configurationRepository);
}
private void initRegistryCenter(final OrchestrationConfiguration orchestrationConfig) {
registryCenterName = getInstanceName(orchestrationConfig.getInstanceConfigurationMap(), CenterType.REGISTRY_CENTER.getValue());
- CenterConfiguration registryCenterConfiguration = orchestrationConfig.getInstanceConfigurationMap().get(registryCenterName);
- Preconditions.checkNotNull(registryCenterConfiguration, "Registry center configuration cannot be null.");
- registryRepository = TypedSPIRegistry.getRegisteredService(RegistryRepository.class, registryCenterConfiguration.getType(), registryCenterConfiguration.getProps());
- registryRepository.init(registryCenterConfiguration);
+ OrchestrationRepositoryConfiguration orchestrationRepositoryConfiguration = orchestrationConfig.getInstanceConfigurationMap().get(registryCenterName);
+ Preconditions.checkNotNull(orchestrationRepositoryConfiguration, "Registry center configuration cannot be null.");
+ registryRepository = TypedSPIRegistry.getRegisteredService(
+ RegistryRepository.class, orchestrationRepositoryConfiguration.getType(), orchestrationRepositoryConfiguration.getProps());
+ registryRepository.init(orchestrationRepositoryConfiguration);
registryCenter = new RegistryCenter(registryCenterName, registryRepository);
}
private void initMetaDataCenter(final OrchestrationConfiguration orchestrationConfig) {
metaDataCenterName = getInstanceName(orchestrationConfig.getInstanceConfigurationMap(), CenterType.METADATA_CENTER.getValue());
- CenterConfiguration metaDataCenterConfiguration = orchestrationConfig.getInstanceConfigurationMap().get(metaDataCenterName);
- Preconditions.checkNotNull(metaDataCenterConfiguration, "MetaData center configuration cannot be null.");
- metaDataRepository = TypedSPIRegistry.getRegisteredService(ConfigurationRepository.class, metaDataCenterConfiguration.getType(), metaDataCenterConfiguration.getProps());
- metaDataRepository.init(metaDataCenterConfiguration);
+ OrchestrationRepositoryConfiguration orchestrationRepositoryConfiguration = orchestrationConfig.getInstanceConfigurationMap().get(metaDataCenterName);
+ Preconditions.checkNotNull(orchestrationRepositoryConfiguration, "MetaData center configuration cannot be null.");
+ metaDataRepository = TypedSPIRegistry.getRegisteredService(
+ ConfigurationRepository.class, orchestrationRepositoryConfiguration.getType(), orchestrationRepositoryConfiguration.getProps());
+ metaDataRepository.init(orchestrationRepositoryConfiguration);
metaDataCenter = new MetaDataCenter(metaDataCenterName, metaDataRepository);
}
- private String getInstanceName(final Map<String, CenterConfiguration> centerConfigurations, final String type) {
- Optional<String> result = centerConfigurations.entrySet().stream().filter(entry -> contains(entry.getValue().getOrchestrationType(), type)).findFirst().map(Entry::getKey);
+ private String getInstanceName(final Map<String, OrchestrationRepositoryConfiguration> orchestrationRepositoryConfigurations, final String type) {
+ Optional<String> result = orchestrationRepositoryConfigurations.entrySet().stream().filter(entry -> contains(entry.getValue().getOrchestrationType(), type)).findFirst().map(Entry::getKey);
Preconditions.checkArgument(result.isPresent(), "Can not find instance configuration with orchestration type.");
return result.get();
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacadeTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacadeTest.java
index f3daf19..7a27a17 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacadeTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/OrchestrationFacadeTest.java
@@ -28,7 +28,7 @@ import org.apache.shardingsphere.orchestration.core.facade.util.FieldUtil;
import org.apache.shardingsphere.orchestration.core.metadata.MetaDataCenter;
import org.apache.shardingsphere.orchestration.core.registry.RegistryCenter;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.junit.Before;
import org.junit.Test;
@@ -69,16 +69,16 @@ public final class OrchestrationFacadeTest {
@Before
public void setUp() {
- Map<String, CenterConfiguration> instanceConfigurationMap = new HashMap<>();
- CenterConfiguration configuration1 = new CenterConfiguration("SecondTestRegistryCenter", new Properties());
+ Map<String, OrchestrationRepositoryConfiguration> instanceConfigurationMap = new HashMap<>();
+ OrchestrationRepositoryConfiguration configuration1 = new OrchestrationRepositoryConfiguration("SecondTestRegistryCenter", new Properties());
configuration1.setOrchestrationType("registry_center");
configuration1.setNamespace("namespace_1");
instanceConfigurationMap.put("test_name_1", configuration1);
- CenterConfiguration configuration2 = new CenterConfiguration("FirstTestConfigCenter", new Properties());
+ OrchestrationRepositoryConfiguration configuration2 = new OrchestrationRepositoryConfiguration("FirstTestConfigCenter", new Properties());
configuration2.setOrchestrationType("config_center");
configuration2.setNamespace("namespace_2");
instanceConfigurationMap.put("test_name_2", configuration2);
- CenterConfiguration configuration3 = new CenterConfiguration("FirstTestConfigCenter", new Properties());
+ OrchestrationRepositoryConfiguration configuration3 = new OrchestrationRepositoryConfiguration("FirstTestConfigCenter", new Properties());
configuration3.setOrchestrationType("metadata_center");
configuration3.setNamespace("namespace_3");
instanceConfigurationMap.put("test_name_3", configuration3);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/FirstTestConfigurationRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/FirstTestConfigurationRepo [...]
index 430b38a..3102ad2 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/FirstTestConfigurationRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/FirstTestConfigurationRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@ public final class FirstTestConfigurationRepository implements ConfigurationRepo
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/SecondTestRegistryRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/SecondTestRegistryRepository.java
index 6298a85..b8b4bc8 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/SecondTestRegistryRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-facade/src/test/java/org/apache/shardingsphere/orchestration/core/facade/fixture/SecondTestRegistryRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@ public final class SecondTestRegistryRepository implements RegistryRepository {
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/FirstTestRegistryRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/FirstTestRegistryReposi [...]
index 7f1735b..7ab9be3 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/FirstTestRegistryRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/FirstTestRegistryRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@ public final class FirstTestRegistryRepository implements RegistryRepository {
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/SecondTestRegistryRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/SecondTestRegistryRepo [...]
index d8c58cb..c587453 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/SecondTestRegistryRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-core/shardingsphere-orchestration-core-registry/src/test/java/org/apache/shardingsphere/orchestration/core/registry/fixture/SecondTestRegistryRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.List;
@@ -34,7 +34,7 @@ public final class SecondTestRegistryRepository implements RegistryRepository {
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java
index a4e7dd3..27c7355 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/OrchestrationRepository.java
@@ -17,7 +17,7 @@
package org.apache.shardingsphere.orchestration.repository.api;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import org.apache.shardingsphere.infra.spi.type.TypedSPI;
@@ -33,7 +33,7 @@ public interface OrchestrationRepository extends TypedSPI {
*
* @param config config center configuration
*/
- void init(CenterConfiguration config);
+ void init(OrchestrationRepositoryConfiguration config);
/**
* Get data from config center.
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationConfiguration.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/Orchestrat [...]
index 91d9f02..41f61e3 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationConfiguration.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationConfiguration.java
@@ -29,5 +29,5 @@ import java.util.Map;
@Getter
public final class OrchestrationConfiguration {
- private final Map<String, CenterConfiguration> instanceConfigurationMap;
+ private final Map<String, OrchestrationRepositoryConfiguration> instanceConfigurationMap;
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/CenterConfiguration.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationRepo [...]
similarity index 86%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/CenterConfiguration.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationRepositoryConfiguration.java
index a84d2c5..1fb327a 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/CenterConfiguration.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationRepositoryConfiguration.java
@@ -24,11 +24,11 @@ import org.apache.shardingsphere.infra.config.TypedSPIConfiguration;
import java.util.Properties;
/**
- * Orchestration instance configuration.
+ * Orchestration repository configuration.
*/
@Getter
@Setter
-public final class CenterConfiguration extends TypedSPIConfiguration {
+public final class OrchestrationRepositoryConfiguration extends TypedSPIConfiguration {
/**
* Type of center, such as config_center, registry_center, metadata_center.
@@ -45,7 +45,7 @@ public final class CenterConfiguration extends TypedSPIConfiguration {
*/
private String namespace;
- public CenterConfiguration(final String type, final Properties props) {
+ public OrchestrationRepositoryConfiguration(final String type, final Properties props) {
super(type, props);
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationException.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/Orchestr [...]
index a6ec27a..6fd0704 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationException.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/main/java/org/apache/shardingsphere/orchestration/repository/api/exception/OrchestrationException.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.orchestration.repository.api.exception;
/**
- * Config center exception.
+ * Orchestration exception.
*/
public final class OrchestrationException extends RuntimeException {
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationConfigurationTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/Orches [...]
index cbdc8fc..635b20f 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationConfigurationTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationConfigurationTest.java
@@ -29,7 +29,7 @@ public final class OrchestrationConfigurationTest {
@Test
public void assertInstanceConfigurationMap() {
- Map<String, CenterConfiguration> configurationMap = new HashMap<>();
+ Map<String, OrchestrationRepositoryConfiguration> configurationMap = new HashMap<>();
assertThat(new OrchestrationConfiguration(configurationMap).getInstanceConfigurationMap(), is(configurationMap));
}
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/CenterConfigurationTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/Orchestration [...]
similarity index 76%
rename from shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/CenterConfigurationTest.java
rename to shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationRepositoryConfigurationTest.java
index b73c0d5..9b65712 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/CenterConfigurationTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/config/OrchestrationRepositoryConfigurationTest.java
@@ -24,19 +24,19 @@ import java.util.Properties;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
-public final class CenterConfigurationTest {
+public final class OrchestrationRepositoryConfigurationTest {
@Test
public void assertConstructorWithType() {
String type = "zookeeper";
- assertThat(new CenterConfiguration(type, new Properties()).getType(), is(type));
+ assertThat(new OrchestrationRepositoryConfiguration(type, new Properties()).getType(), is(type));
}
@Test
public void assertConstructorWithTypeAndProperties() {
String type = "zookeeper";
Properties props = new Properties();
- CenterConfiguration configuration = new CenterConfiguration(type, props);
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(type, props);
assertThat(configuration.getType(), is(type));
assertThat(configuration.getProps(), is(props));
}
@@ -45,7 +45,7 @@ public final class CenterConfigurationTest {
public void assertCenterType() {
String type = "zookeeper";
String orchestrationType = "config_center";
- CenterConfiguration configuration = new CenterConfiguration(type, new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(type, new Properties());
configuration.setOrchestrationType(orchestrationType);
assertThat(configuration.getOrchestrationType(), is(orchestrationType));
}
@@ -54,7 +54,7 @@ public final class CenterConfigurationTest {
public void assertServerLists() {
String type = "zookeeper";
String serverLists = "127.0.0.1:2181,127.0.0.1:2182";
- CenterConfiguration configuration = new CenterConfiguration(type, new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(type, new Properties());
configuration.setServerLists(serverLists);
assertThat(configuration.getServerLists(), is(serverLists));
}
@@ -63,7 +63,7 @@ public final class CenterConfigurationTest {
public void assertNamespace() {
String type = "zookeeper";
String namespace = "orchestration";
- CenterConfiguration configuration = new CenterConfiguration(type, new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(type, new Properties());
configuration.setNamespace(namespace);
assertThat(configuration.getNamespace(), is(namespace));
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/FirstTestRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/FirstTestReposi [...]
index 8c79707..b1f93fc 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/FirstTestRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-api/src/test/java/org/apache/shardingsphere/orchestration/repository/api/fixture/FirstTestRepository.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.orchestration.repository.api.fixture;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
@@ -35,7 +35,7 @@ public final class FirstTestRepository implements ConfigurationRepository {
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestrati [...]
index 72c4e64..45b7087 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapper.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.orchestration.repository.common.configuration.
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import java.util.Map;
@@ -43,7 +43,7 @@ public final class OrchestrationConfigurationYamlSwapper implements YamlSwapper<
@Override
public OrchestrationConfiguration swapToObject(final YamlOrchestrationConfiguration configuration) {
OrchestrationRepositoryConfigurationYamlSwapper swapper = new OrchestrationRepositoryConfigurationYamlSwapper();
- Map<String, CenterConfiguration> instanceConfigurationMap =
+ Map<String, OrchestrationRepositoryConfiguration> instanceConfigurationMap =
configuration.getOrchestrationRepositoryConfigurationMap().entrySet().stream().collect(Collectors.toMap(Entry::getKey, entry -> swapper.swapToObject(entry.getValue())));
return new OrchestrationConfiguration(instanceConfigurationMap);
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/o [...]
index 7e7ccd5..8c83d76 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/main/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapper.java
@@ -18,16 +18,16 @@
package org.apache.shardingsphere.orchestration.repository.common.configuration.swapper;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.infra.yaml.swapper.YamlSwapper;
/**
* Orchestration repository configuration YAML swapper.
*/
-public final class OrchestrationRepositoryConfigurationYamlSwapper implements YamlSwapper<YamlOrchestrationRepositoryConfiguration, CenterConfiguration> {
+public final class OrchestrationRepositoryConfigurationYamlSwapper implements YamlSwapper<YamlOrchestrationRepositoryConfiguration, OrchestrationRepositoryConfiguration> {
@Override
- public YamlOrchestrationRepositoryConfiguration swapToYamlConfiguration(final CenterConfiguration configuration) {
+ public YamlOrchestrationRepositoryConfiguration swapToYamlConfiguration(final OrchestrationRepositoryConfiguration configuration) {
YamlOrchestrationRepositoryConfiguration result = new YamlOrchestrationRepositoryConfiguration();
result.setOrchestrationType(configuration.getOrchestrationType());
result.setInstanceType(configuration.getType());
@@ -38,8 +38,8 @@ public final class OrchestrationRepositoryConfigurationYamlSwapper implements Ya
}
@Override
- public CenterConfiguration swapToObject(final YamlOrchestrationRepositoryConfiguration yamlConfiguration) {
- CenterConfiguration result = new CenterConfiguration(yamlConfiguration.getInstanceType(), yamlConfiguration.getProps());
+ public OrchestrationRepositoryConfiguration swapToObject(final YamlOrchestrationRepositoryConfiguration yamlConfiguration) {
+ OrchestrationRepositoryConfiguration result = new OrchestrationRepositoryConfiguration(yamlConfiguration.getInstanceType(), yamlConfiguration.getProps());
result.setOrchestrationType(yamlConfiguration.getOrchestrationType());
result.setServerLists(yamlConfiguration.getServerLists());
result.setNamespace(yamlConfiguration.getNamespace());
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchest [...]
index 30686e2..19b99af 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapperTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationConfigurationYamlSwapperTest.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.orchestration.repository.common.configuration.
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.junit.Test;
import java.util.HashMap;
@@ -63,11 +63,11 @@ public final class OrchestrationConfigurationYamlSwapperTest {
}
private OrchestrationConfiguration getOrchestrationConfiguration() {
- CenterConfiguration instanceConfiguration = new CenterConfiguration("zookeeper", new Properties());
+ OrchestrationRepositoryConfiguration instanceConfiguration = new OrchestrationRepositoryConfiguration("zookeeper", new Properties());
instanceConfiguration.setOrchestrationType("config_center");
instanceConfiguration.setServerLists("127.0.0.1:2181,127.0.0.1:2182");
instanceConfiguration.setNamespace("orchestration");
- Map<String, CenterConfiguration> instanceConfigurationMap = new HashMap<>();
+ Map<String, OrchestrationRepositoryConfiguration> instanceConfigurationMap = new HashMap<>();
instanceConfigurationMap.put(LOGIC_SCHEMA, instanceConfiguration);
return new OrchestrationConfiguration(instanceConfigurationMap);
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphe [...]
index a0aa60d..105700c 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapperTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-common/src/test/java/org/apache/shardingsphere/orchestration/repository/common/configuration/swapper/OrchestrationRepositoryConfigurationYamlSwapperTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.orchestration.repository.common.configuration.swapper;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.junit.Test;
import java.util.Properties;
@@ -30,7 +30,7 @@ public final class OrchestrationRepositoryConfigurationYamlSwapperTest {
@Test
public void assertToYamlConfiguration() {
- CenterConfiguration configuration = getConfiguration();
+ OrchestrationRepositoryConfiguration configuration = getConfiguration();
YamlOrchestrationRepositoryConfiguration yamlConfiguration = new OrchestrationRepositoryConfigurationYamlSwapper().swapToYamlConfiguration(configuration);
assertThat(yamlConfiguration.getOrchestrationType(), is(configuration.getOrchestrationType()));
assertThat(yamlConfiguration.getInstanceType(), is(configuration.getType()));
@@ -39,8 +39,8 @@ public final class OrchestrationRepositoryConfigurationYamlSwapperTest {
assertThat(yamlConfiguration.getProps(), is(configuration.getProps()));
}
- private CenterConfiguration getConfiguration() {
- CenterConfiguration result = new CenterConfiguration("zookeeper", new Properties());
+ private OrchestrationRepositoryConfiguration getConfiguration() {
+ OrchestrationRepositoryConfiguration result = new OrchestrationRepositoryConfiguration("zookeeper", new Properties());
result.setOrchestrationType("config_center");
result.setServerLists("127.0.0.1:2181,127.0.0.1:2182");
result.setNamespace("orchestration");
@@ -50,7 +50,7 @@ public final class OrchestrationRepositoryConfigurationYamlSwapperTest {
@Test
public void assertSwapToObject() {
YamlOrchestrationRepositoryConfiguration yamlConfiguration = getYamlInstanceConfiguration();
- CenterConfiguration instanceConfiguration = new OrchestrationRepositoryConfigurationYamlSwapper().swapToObject(yamlConfiguration);
+ OrchestrationRepositoryConfiguration instanceConfiguration = new OrchestrationRepositoryConfigurationYamlSwapper().swapToObject(yamlConfiguration);
assertThat(instanceConfiguration.getOrchestrationType(), is(yamlConfiguration.getOrchestrationType()));
assertThat(instanceConfiguration.getType(), is(yamlConfiguration.getInstanceType()));
assertThat(instanceConfiguration.getServerLists(), is(yamlConfiguration.getServerLists()));
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apo [...]
index c19a68d..f17f268 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepository.java
@@ -30,7 +30,7 @@ import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloO
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.HashMap;
@@ -55,7 +55,7 @@ public final class ApolloRepository implements ConfigurationRepository {
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
ApolloProperties apolloProperties = new ApolloProperties(props);
configWrapper = new ApolloConfigWrapper(config, apolloProperties);
openApiWrapper = new ApolloOpenApiWrapper(config, apolloProperties);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloConfigWrapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-rep [...]
index 84c0e2a..8723093 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloConfigWrapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloConfigWrapper.java
@@ -23,7 +23,7 @@ import com.ctrip.framework.apollo.ConfigService;
import com.ctrip.framework.apollo.core.ConfigConsts;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloProperties;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloPropertyKey;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Set;
@@ -38,7 +38,7 @@ public final class ApolloConfigWrapper {
private final Config apolloConfig;
- public ApolloConfigWrapper(final CenterConfiguration config, final ApolloProperties props) {
+ public ApolloConfigWrapper(final OrchestrationRepositoryConfiguration config, final ApolloProperties props) {
String appId = props.getValue(ApolloPropertyKey.APP_ID);
String env = props.getValue(ApolloPropertyKey.ENV);
String clusterName = props.getValue(ApolloPropertyKey.CLUSTER_NAME);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapper.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-re [...]
index 4b78366..6685afd 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapper.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/main/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapper.java
@@ -22,7 +22,7 @@ import com.ctrip.framework.apollo.openapi.dto.NamespaceReleaseDTO;
import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloProperties;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloPropertyKey;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
/**
* Apollo open api client wrapper.
@@ -41,7 +41,7 @@ public final class ApolloOpenApiWrapper {
private final String administrator;
- public ApolloOpenApiWrapper(final CenterConfiguration config, final ApolloProperties props) {
+ public ApolloOpenApiWrapper(final OrchestrationRepositoryConfiguration config, final ApolloProperties props) {
namespace = config.getNamespace();
appId = props.getValue(ApolloPropertyKey.APP_ID);
env = props.getValue(ApolloPropertyKey.ENV);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepositoryTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository [...]
index c2d67d2..dc93a46 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepositoryTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/ApolloRepositoryTest.java
@@ -25,7 +25,7 @@ import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloC
import org.apache.shardingsphere.orchestration.repository.apollo.wrapper.ApolloOpenApiWrapper;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.junit.BeforeClass;
import org.junit.ClassRule;
import org.junit.Test;
@@ -64,7 +64,7 @@ public final class ApolloRepositoryTest {
@SneakyThrows(ReflectiveOperationException.class)
@BeforeClass
public static void init() {
- CenterConfiguration configuration = new CenterConfiguration("apollo", new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration("apollo", new Properties());
configuration.setServerLists("http://config-service-url");
configuration.setNamespace("orchestration");
Properties props = new Properties();
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloConfigWrapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration [...]
index 5c4d059..225f6e0 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloConfigWrapperTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloConfigWrapperTest.java
@@ -23,7 +23,7 @@ import com.ctrip.framework.apollo.mockserver.EmbeddedApollo;
import com.ctrip.framework.apollo.model.ConfigChangeEvent;
import com.google.common.util.concurrent.SettableFuture;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloProperties;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Test;
@@ -51,7 +51,7 @@ public final class ApolloConfigWrapperTest {
@Before
public void setup() {
- CenterConfiguration configuration = new CenterConfiguration("apollo", new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration("apollo", new Properties());
configuration.setServerLists("http://config-service-url");
configuration.setNamespace("orchestration");
configWrapper = new ApolloConfigWrapper(configuration, new ApolloProperties(new Properties()));
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapperTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestratio [...]
index 376b55c..599193d 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapperTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-apollo/src/test/java/org/apache/shardingsphere/orchestration/repository/apollo/wrapper/ApolloOpenApiWrapperTest.java
@@ -21,7 +21,7 @@ import com.ctrip.framework.apollo.openapi.client.ApolloOpenApiClient;
import com.ctrip.framework.apollo.openapi.dto.NamespaceReleaseDTO;
import com.ctrip.framework.apollo.openapi.dto.OpenItemDTO;
import lombok.SneakyThrows;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloProperties;
import org.apache.shardingsphere.orchestration.repository.apollo.ApolloPropertyKey;
import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
@@ -64,7 +64,7 @@ public final class ApolloOpenApiWrapperTest {
Properties props = new Properties();
props.setProperty(ApolloPropertyKey.PORTAL_URL.getKey(), PORTAL_URL);
props.setProperty(ApolloPropertyKey.TOKEN.getKey(), TOKEN);
- apolloOpenApiWrapper = new ApolloOpenApiWrapper(new CenterConfiguration("apollo", new Properties()), new ApolloProperties(props));
+ apolloOpenApiWrapper = new ApolloOpenApiWrapper(new OrchestrationRepositoryConfiguration("apollo", new Properties()), new ApolloProperties(props));
FieldSetter.setField(apolloOpenApiWrapper, ApolloOpenApiWrapper.class.getDeclaredField("client"), client);
FieldSetter.setField(apolloOpenApiWrapper, ApolloOpenApiWrapper.class.getDeclaredField("namespace"), NAME_SPACE);
FieldSetter.setField(apolloOpenApiWrapper, ApolloOpenApiWrapper.class.getDeclaredField("appId"), ApolloPropertyKey.APP_ID.getDefaultValue());
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/main/java/org/apache/shardingsphere/orchestration/repository/etcd/EtcdRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/ [...]
index db92f55..ffee97c 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/main/java/org/apache/shardingsphere/orchestration/repository/etcd/EtcdRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/main/java/org/apache/shardingsphere/orchestration/repository/etcd/EtcdRepository.java
@@ -33,7 +33,7 @@ import lombok.Setter;
import lombok.SneakyThrows;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
@@ -56,7 +56,7 @@ public final class EtcdRepository implements ConfigurationRepository, RegistryRe
private EtcdProperties etcdProperties;
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
this.etcdProperties = new EtcdProperties(props);
client = Client.builder().endpoints(Util.toURIs(Splitter.on(",").trimResults().splitToList(config.getServerLists()))).build();
}
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/test/java/org/apache/shardingsphere/orchestration/repository/etcd/EtcdRepositoryTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/ [...]
index 73136f8..a5651a1 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/test/java/org/apache/shardingsphere/orchestration/repository/etcd/EtcdRepositoryTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-etcd/src/test/java/org/apache/shardingsphere/orchestration/repository/etcd/EtcdRepositoryTest.java
@@ -33,7 +33,7 @@ import io.etcd.jetcd.watch.WatchEvent;
import io.etcd.jetcd.watch.WatchResponse;
import io.grpc.stub.StreamObserver;
import lombok.SneakyThrows;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -223,7 +223,7 @@ public final class EtcdRepositoryTest {
@Test
public void assertProperties() {
- CenterConfiguration configuration = new CenterConfiguration(CENTER_TYPE, new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(CENTER_TYPE, new Properties());
configuration.setServerLists("127.0.0.1");
Properties props = new Properties();
repository.setProps(props);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/main/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/ [...]
index 717ad55..6c1bb33 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/main/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/main/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepository.java
@@ -29,7 +29,7 @@ import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepos
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import org.apache.shardingsphere.orchestration.repository.api.util.ConfigKeyUtils;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.List;
import java.util.Properties;
@@ -55,7 +55,7 @@ public final class NacosRepository implements ConfigurationRepository {
* @param config config center configuration
*/
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
try {
nacosProperties = new NacosProperties(props);
Properties props = new Properties();
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/test/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepositoryTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-na [...]
index 1004321..fdcbae1 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/test/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepositoryTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-nacos/src/test/java/org/apache/shardingsphere/orchestration/repository/nacos/NacosRepositoryTest.java
@@ -24,7 +24,7 @@ import lombok.SneakyThrows;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent.ChangedType;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.junit.Before;
import org.junit.Test;
import org.mockito.AdditionalAnswers;
@@ -60,7 +60,7 @@ public final class NacosRepositoryTest {
Properties props = new Properties();
props.setProperty("group", group);
props.setProperty("timeout", "3000");
- CenterConfiguration configuration = new CenterConfiguration(REPOSITORY.getType(), props);
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(REPOSITORY.getType(), props);
configuration.setServerLists("127.0.0.1:8848");
REPOSITORY.init(configuration);
setConfigService(configService);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepository.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orch [...]
index c860857..d5b6c42 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepository.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/main/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepository.java
@@ -34,7 +34,7 @@ import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository
import org.apache.shardingsphere.orchestration.repository.zookeeper.handler.CuratorZookeeperExceptionHandler;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.zookeeper.CreateMode;
import org.apache.zookeeper.KeeperException.OperationTimeoutException;
import org.apache.zookeeper.ZooDefs;
@@ -62,13 +62,13 @@ public final class CuratorZookeeperRepository implements ConfigurationRepository
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
ZookeeperProperties zookeeperProperties = new ZookeeperProperties(props);
client = buildCuratorClient(config, zookeeperProperties);
initCuratorClient(zookeeperProperties);
}
- private CuratorFramework buildCuratorClient(final CenterConfiguration config, final ZookeeperProperties zookeeperProperties) {
+ private CuratorFramework buildCuratorClient(final OrchestrationRepositoryConfiguration config, final ZookeeperProperties zookeeperProperties) {
int retryIntervalMilliseconds = zookeeperProperties.getValue(ZookeeperPropertyKey.RETRY_INTERVAL_MILLISECONDS);
int maxRetries = zookeeperProperties.getValue(ZookeeperPropertyKey.MAX_RETRIES);
int timeToLiveSeconds = zookeeperProperties.getValue(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS);
diff --git a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepositoryTest.java b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere- [...]
index 608fc23..b3d75e5 100644
--- a/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepositoryTest.java
+++ b/shardingsphere-control-panel/shardingsphere-orchestration/shardingsphere-orchestration-repository/shardingsphere-orchestration-repository-provider/shardingsphere-orchestration-repository-zookeeper-curator/src/test/java/org/apache/shardingsphere/orchestration/repository/zookeeper/CuratorZookeeperRepositoryTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.orchestration.repository.zookeeper;
import org.apache.curator.framework.CuratorFramework;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.exception.OrchestrationException;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEvent;
import org.junit.Assert;
@@ -46,7 +46,7 @@ public final class CuratorZookeeperRepositoryTest {
public static void init() {
EmbedTestingServer.start();
serverLists = EmbedTestingServer.getTestingServerConnectionString();
- CenterConfiguration configuration = new CenterConfiguration(REPOSITORY.getType(), new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(REPOSITORY.getType(), new Properties());
configuration.setServerLists(serverLists);
REPOSITORY.init(configuration);
}
@@ -136,7 +136,7 @@ public final class CuratorZookeeperRepositoryTest {
props.setProperty(ZookeeperPropertyKey.MAX_RETRIES.getKey(), "1");
props.setProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey(), "1000");
props.setProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey(), "2000");
- CenterConfiguration configuration = new CenterConfiguration(repository.getType(), new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(repository.getType(), new Properties());
configuration.setServerLists(serverLists);
repository.setProps(props);
repository.init(configuration);
@@ -153,7 +153,7 @@ public final class CuratorZookeeperRepositoryTest {
final CuratorZookeeperRepository repository = new CuratorZookeeperRepository();
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.TIME_TO_LIVE_SECONDS.getKey(), "0");
- CenterConfiguration configuration = new CenterConfiguration(repository.getType(), new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(repository.getType(), new Properties());
configuration.setServerLists(serverLists);
repository.setProps(props);
repository.init(configuration);
@@ -167,7 +167,7 @@ public final class CuratorZookeeperRepositoryTest {
final CuratorZookeeperRepository repository = new CuratorZookeeperRepository();
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.OPERATION_TIMEOUT_MILLISECONDS.getKey(), "0");
- CenterConfiguration configuration = new CenterConfiguration(repository.getType(), new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(repository.getType(), new Properties());
configuration.setServerLists(serverLists);
repository.setProps(props);
repository.init(configuration);
@@ -181,7 +181,7 @@ public final class CuratorZookeeperRepositoryTest {
final CuratorZookeeperRepository repository = new CuratorZookeeperRepository();
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.DIGEST.getKey(), "any");
- CenterConfiguration configuration = new CenterConfiguration(repository.getType(), new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(repository.getType(), new Properties());
configuration.setServerLists(serverLists);
repository.setProps(props);
repository.init(configuration);
@@ -204,7 +204,7 @@ public final class CuratorZookeeperRepositoryTest {
@Test
public void assertZKCloseAndException() {
CuratorZookeeperRepository repository = new CuratorZookeeperRepository();
- CenterConfiguration configuration = new CenterConfiguration(repository.getType(), new Properties());
+ OrchestrationRepositoryConfiguration configuration = new OrchestrationRepositoryConfiguration(repository.getType(), new Properties());
Properties props = new Properties();
props.setProperty(ZookeeperPropertyKey.DIGEST.getKey(), "digest");
configuration.setServerLists(serverLists);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java
index 1fa5fc6..1219ab4 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/main/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlOrchestrationRepositoryConfigurationSwapperUtil.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.driver.orchestration.internal.util;
import lombok.AccessLevel;
import lombok.NoArgsConstructor;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.swapper.OrchestrationRepositoryConfigurationYamlSwapper;
@@ -41,8 +41,8 @@ public final class YamlOrchestrationRepositoryConfigurationSwapperUtil {
* @param yamlConfigurationMap YAML orchestration repository configuration map
* @return orchestration repository configuration map
*/
- public static Map<String, CenterConfiguration> marshal(final Map<String, YamlOrchestrationRepositoryConfiguration> yamlConfigurationMap) {
- Map<String, CenterConfiguration> result = new LinkedHashMap<>(yamlConfigurationMap.size(), 1);
+ public static Map<String, OrchestrationRepositoryConfiguration> marshal(final Map<String, YamlOrchestrationRepositoryConfiguration> yamlConfigurationMap) {
+ Map<String, OrchestrationRepositoryConfiguration> result = new LinkedHashMap<>(yamlConfigurationMap.size(), 1);
for (Entry<String, YamlOrchestrationRepositoryConfiguration> each : yamlConfigurationMap.entrySet()) {
result.put(each.getKey(), SWAPPER.swapToObject(each.getValue()));
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestConfigurationRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestConfigurationRepository.java
index fd5e6b7..4a06af8 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestConfigurationRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestConfigurationRepository.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.orchestration.fixture;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -38,7 +38,7 @@ public final class FirstTestConfigurationRepository implements ConfigurationRepo
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestMetaDataRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestMetaDataRepository.java
index d9696b4..dc4449d 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestMetaDataRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestMetaDataRepository.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.orchestration.fixture;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -38,7 +38,7 @@ public final class FirstTestMetaDataRepository implements ConfigurationRepositor
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestRegistryRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestRegistryRepository.java
index 18045b0..73d3175 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestRegistryRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FirstTestRegistryRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -39,7 +39,7 @@ public final class FirstTestRegistryRepository implements RegistryRepository, Co
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestConfigurationRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestConfigurationRepository.java
index d269cdf..1758e56 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestConfigurationRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestConfigurationRepository.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.orchestration.fixture;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -38,7 +38,7 @@ public final class FourthTestConfigurationRepository implements ConfigurationRep
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestRegistryRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestRegistryRepository.java
index dbc1f62..723471a 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestRegistryRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/FourthTestRegistryRepository.java
@@ -22,7 +22,7 @@ import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.LinkedHashMap;
@@ -39,7 +39,7 @@ public final class FourthTestRegistryRepository implements RegistryRepository, C
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestConfigurationRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestConfigurationRepository.java
index 4e02a0d..4dffea5 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestConfigurationRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestConfigurationRepository.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.orchestration.fixture;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -38,7 +38,7 @@ public final class SecondTestConfigurationRepository implements ConfigurationRep
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestRegistryRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestRegistryRepository.java
index 123d179..ec2442d 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestRegistryRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/SecondTestRegistryRepository.java
@@ -22,7 +22,7 @@ import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.LinkedHashMap;
@@ -39,7 +39,7 @@ public final class SecondTestRegistryRepository implements RegistryRepository, C
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestConfigurationRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestConfigurationRepository.java
index fd77ea5..6f69b7e 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestConfigurationRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestConfigurationRepository.java
@@ -20,7 +20,7 @@ package org.apache.shardingsphere.driver.orchestration.fixture;
import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -38,7 +38,7 @@ public final class ThirdTestConfigurationRepository implements ConfigurationRepo
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestRegistryRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestRegistryRepository.java
index f8b2936..5ec15ca 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestRegistryRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/fixture/ThirdTestRegistryRepository.java
@@ -22,7 +22,7 @@ import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import java.util.Collections;
import java.util.LinkedHashMap;
@@ -39,7 +39,7 @@ public final class ThirdTestRegistryRepository implements RegistryRepository, Co
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/datasource/OrchestrationShardingSphereDataSourceTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/datasource/OrchestrationShardingSphereDataSourceTest.java
index 2d78435..cb7537a 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/datasource/OrchestrationShardingSphereDataSourceTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/datasource/OrchestrationShardingSphereDataSourceTest.java
@@ -27,7 +27,7 @@ import org.apache.shardingsphere.infra.config.algorithm.ShardingSphereAlgorithmC
import org.apache.shardingsphere.infra.database.DefaultSchema;
import org.apache.shardingsphere.masterslave.api.config.MasterSlaveRuleConfiguration;
import org.apache.shardingsphere.masterslave.api.config.rule.MasterSlaveDataSourceRuleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.orchestration.core.common.CenterType;
import org.apache.shardingsphere.orchestration.core.common.event.DataSourceChangedEvent;
@@ -73,37 +73,37 @@ public final class OrchestrationShardingSphereDataSourceTest {
}
private static OrchestrationConfiguration getOrchestrationConfiguration() {
- Map<String, CenterConfiguration> instanceConfigurationMap = new HashMap<>();
- instanceConfigurationMap.put("test_sharding_registry_name", getRegistryCenterConfiguration());
- instanceConfigurationMap.put("test_sharding_config_name", getConfigCenterConfiguration());
- instanceConfigurationMap.put("test_sharding_metadata_name", getMetaDataCenterConfiguration());
+ Map<String, OrchestrationRepositoryConfiguration> instanceConfigurationMap = new HashMap<>();
+ instanceConfigurationMap.put("test_sharding_registry_name", getRegistryOrchestrationRepositoryConfiguration());
+ instanceConfigurationMap.put("test_sharding_config_name", getConfigOrchestrationRepositoryConfiguration());
+ instanceConfigurationMap.put("test_sharding_metadata_name", getMetaDataOrchestrationRepositoryConfiguration());
return new OrchestrationConfiguration(instanceConfigurationMap);
}
- private static CenterConfiguration getRegistryCenterConfiguration() {
+ private static OrchestrationRepositoryConfiguration getRegistryOrchestrationRepositoryConfiguration() {
Properties properties = new Properties();
properties.setProperty("overwrite", "true");
- CenterConfiguration result = new CenterConfiguration("FourthTestRegistryCenter", properties);
+ OrchestrationRepositoryConfiguration result = new OrchestrationRepositoryConfiguration("FourthTestRegistryCenter", properties);
result.setOrchestrationType(CenterType.REGISTRY_CENTER.getValue());
result.setNamespace("test_sharding_registry");
result.setServerLists("localhost:3181");
return result;
}
- private static CenterConfiguration getConfigCenterConfiguration() {
+ private static OrchestrationRepositoryConfiguration getConfigOrchestrationRepositoryConfiguration() {
Properties properties = new Properties();
properties.setProperty("overwrite", "true");
- CenterConfiguration result = new CenterConfiguration("FourthTestConfigCenter", properties);
+ OrchestrationRepositoryConfiguration result = new OrchestrationRepositoryConfiguration("FourthTestConfigCenter", properties);
result.setOrchestrationType(CenterType.CONFIG_CENTER.getValue());
result.setNamespace("test_sharding_config");
result.setServerLists("localhost:3181");
return result;
}
- private static CenterConfiguration getMetaDataCenterConfiguration() {
+ private static OrchestrationRepositoryConfiguration getMetaDataOrchestrationRepositoryConfiguration() {
Properties properties = new Properties();
properties.setProperty("overwrite", "true");
- CenterConfiguration result = new CenterConfiguration("FirstTestMetaDataCenter", properties);
+ OrchestrationRepositoryConfiguration result = new OrchestrationRepositoryConfiguration("FirstTestMetaDataCenter", properties);
result.setOrchestrationType(CenterType.METADATA_CENTER.getValue());
result.setNamespace("test_encrypt_metadata");
result.setServerLists("localhost:3181");
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
index e7e6669..2e21879 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-orchestration/src/test/java/org/apache/shardingsphere/driver/orchestration/internal/util/YamlInstanceConfigurationSwapperUtilTest.java
@@ -18,7 +18,7 @@
package org.apache.shardingsphere.driver.orchestration.internal.util;
import org.apache.shardingsphere.orchestration.core.common.CenterType;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
import org.junit.Test;
@@ -34,8 +34,8 @@ public final class YamlInstanceConfigurationSwapperUtilTest {
public void marshal() {
YamlOrchestrationRepositoryConfiguration yamlOrchestrationRepositoryConfiguration = getYamlOrchestrationRepositoryConfiguration();
Map<String, YamlOrchestrationRepositoryConfiguration> yamlConfigurationMap = Collections.singletonMap("test", yamlOrchestrationRepositoryConfiguration);
- Map<String, CenterConfiguration> configurationMap = YamlOrchestrationRepositoryConfigurationSwapperUtil.marshal(yamlConfigurationMap);
- CenterConfiguration configuration = configurationMap.get("test");
+ Map<String, OrchestrationRepositoryConfiguration> configurationMap = YamlOrchestrationRepositoryConfigurationSwapperUtil.marshal(yamlConfigurationMap);
+ OrchestrationRepositoryConfiguration configuration = configurationMap.get("test");
assertEquals(configuration.getType(), yamlOrchestrationRepositoryConfiguration.getInstanceType());
assertEquals(configuration.getOrchestrationType(), yamlOrchestrationRepositoryConfiguration.getOrchestrationType());
assertEquals(configuration.getNamespace(), yamlOrchestrationRepositoryConfiguration.getNamespace());
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringB [...]
index 61ba883..84c432f 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/main/java/org/apache/shardingsphere/spring/boot/orchestration/OrchestrationSpringBootConfiguration.java
@@ -23,7 +23,7 @@ import org.apache.shardingsphere.cluster.configuration.swapper.ClusterConfigurat
import org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource;
import org.apache.shardingsphere.driver.orchestration.internal.datasource.OrchestrationShardingSphereDataSource;
import org.apache.shardingsphere.infra.config.RuleConfiguration;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.config.YamlOrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.common.configuration.swapper.OrchestrationRepositoryConfigurationYamlSwapper;
@@ -80,7 +80,7 @@ public class OrchestrationSpringBootConfiguration implements EnvironmentAware {
@Bean
public OrchestrationConfiguration orchestrationConfiguration() {
Preconditions.checkState(isValidOrchestrationConfiguration(), "The orchestration configuration is invalid, please configure orchestration");
- Map<String, CenterConfiguration> instanceConfigurationMap = new HashMap<>(root.getOrchestration().size(), 1);
+ Map<String, OrchestrationRepositoryConfiguration> instanceConfigurationMap = new HashMap<>(root.getOrchestration().size(), 1);
for (Entry<String, YamlOrchestrationRepositoryConfiguration> entry : root.getOrchestration().entrySet()) {
instanceConfigurationMap.put(entry.getKey(), swapper.swapToObject(entry.getValue()));
}
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/registry/TestOrchestrationRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/registry/TestOrchest [...]
index 6b3a0ee..0f760be 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/registry/TestOrchestrationRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-boot-starter/src/test/java/org/apache/shardingsphere/spring/boot/orchestration/registry/TestOrchestrationRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -39,7 +39,7 @@ public final class TestOrchestrationRepository implements RegistryRepository, Co
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/orchestration/parser/InstanceBeanDefinitionParser.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/orchestration/parser/InstanceBe [...]
index 3ada7cb..0535421 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/orchestration/parser/InstanceBeanDefinitionParser.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/main/java/org/apache/shardingsphere/spring/namespace/orchestration/parser/InstanceBeanDefinitionParser.java
@@ -19,7 +19,7 @@ package org.apache.shardingsphere.spring.namespace.orchestration.parser;
import com.google.common.base.Strings;
import org.apache.shardingsphere.spring.namespace.orchestration.constants.InstanceBeanDefinitionTag;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.AbstractBeanDefinitionParser;
@@ -42,7 +42,7 @@ public final class InstanceBeanDefinitionParser extends AbstractBeanDefinitionPa
@Override
protected AbstractBeanDefinition parseInternal(final Element element, final ParserContext parserContext) {
- BeanDefinitionBuilder factory = BeanDefinitionBuilder.rootBeanDefinition(CenterConfiguration.class);
+ BeanDefinitionBuilder factory = BeanDefinitionBuilder.rootBeanDefinition(OrchestrationRepositoryConfiguration.class);
factory.addConstructorArgValue(element.getAttribute(InstanceBeanDefinitionTag.TYPE_TAG));
factory.addConstructorArgValue(parseProperties(element, parserContext));
addPropertyValueIfNotEmpty(InstanceBeanDefinitionTag.ORCHESTRATION_TYPE_TAG, PROPERTY_TYPE, element, factory);
diff --git a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/registry/TestOrchestrationRepository.java b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/registry/TestOrc [...]
index 19785fe..f1b4725 100644
--- a/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/registry/TestOrchestrationRepository.java
+++ b/shardingsphere-jdbc/shardingsphere-jdbc-spring/shardingsphere-jdbc-orchestration-spring/shardingsphere-jdbc-orchestration-spring-namespace/src/test/java/org/apache/shardingsphere/spring/namespace/orchestration/registry/TestOrchestrationRepository.java
@@ -21,7 +21,7 @@ import lombok.Getter;
import lombok.Setter;
import org.apache.shardingsphere.orchestration.repository.api.ConfigurationRepository;
import org.apache.shardingsphere.orchestration.repository.api.RegistryRepository;
-import org.apache.shardingsphere.orchestration.repository.api.config.CenterConfiguration;
+import org.apache.shardingsphere.orchestration.repository.api.config.OrchestrationRepositoryConfiguration;
import org.apache.shardingsphere.orchestration.repository.api.listener.DataChangedEventListener;
import java.util.Collections;
@@ -35,7 +35,7 @@ public final class TestOrchestrationRepository implements RegistryRepository, Co
private Properties props = new Properties();
@Override
- public void init(final CenterConfiguration config) {
+ public void init(final OrchestrationRepositoryConfiguration config) {
}
@Override