本文整理了Java中org.apache.shardingsphere.orchestration.yaml.config.YamlOrchestrationConfiguration
类的一些代码示例,展示了YamlOrchestrationConfiguration
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlOrchestrationConfiguration
类的具体详情如下:
包路径:org.apache.shardingsphere.orchestration.yaml.config.YamlOrchestrationConfiguration
类名称:YamlOrchestrationConfiguration
[英]Orchestration configuration for yaml.
[中]yaml的编排配置。
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create sharding data source.
*
* @param dataSourceMap data source map
* @param yamlByteArray yaml byte array for rule configuration of databases and tables sharding without data sources
* @return sharding data source
* @throws SQLException SQL exception
*/
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final byte[] yamlByteArray) throws SQLException {
YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlByteArray);
return createDataSource(dataSourceMap, config.getShardingRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create master-slave data source.
*
* @param dataSourceMap data source map
* @param yamlByteArray yaml byte array for master-slave rule configuration without data sources
* @return master-slave data source
* @throws SQLException SQL exception
*/
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final byte[] yamlByteArray) throws SQLException {
YamlOrchestrationMasterSlaveRuleConfiguration config = unmarshal(yamlByteArray);
return createDataSource(dataSourceMap, config.getMasterSlaveRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create sharding data source.
*
* @param dataSourceMap data source map
* @param yamlFile yaml file for rule configuration of databases and tables sharding without data sources
* @return sharding data source
* @throws SQLException SQL exception
* @throws IOException IO exception
*/
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException {
YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlFile);
return createDataSource(dataSourceMap, config.getShardingRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create master-slave data source.
*
* @param dataSourceMap data source map
* @param yamlFile yaml file for master-slave rule configuration without data sources
* @return master-slave data source
* @throws SQLException SQL exception
* @throws IOException IO exception
*/
public static DataSource createDataSource(final Map<String, DataSource> dataSourceMap, final File yamlFile) throws SQLException, IOException {
YamlOrchestrationMasterSlaveRuleConfiguration config = unmarshal(yamlFile);
return createDataSource(dataSourceMap, config.getMasterSlaveRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create sharding data source.
*
* @param yamlFile yaml file for rule configuration of databases and tables sharding with data sources
* @return sharding data source
* @throws SQLException SQL exception
* @throws IOException IO exception
*/
public static DataSource createDataSource(final File yamlFile) throws SQLException, IOException {
YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlFile);
return createDataSource(config.getDataSources(), config.getShardingRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create master-slave data source.
*
* @param yamlByteArray yaml byte array for master-slave rule configuration with data sources
* @return master-slave data source
* @throws SQLException SQL exception
*/
public static DataSource createDataSource(final byte[] yamlByteArray) throws SQLException {
YamlOrchestrationMasterSlaveRuleConfiguration config = unmarshal(yamlByteArray);
return createDataSource(config.getDataSources(), config.getMasterSlaveRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create sharding data source.
*
* @param yamlByteArray yaml byte array for rule configuration of databases and tables sharding with data sources
* @return sharding data source
* @throws SQLException SQL exception
*/
public static DataSource createDataSource(final byte[] yamlByteArray) throws SQLException {
YamlOrchestrationShardingRuleConfiguration config = unmarshal(yamlByteArray);
return createDataSource(config.getDataSources(), config.getShardingRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
/**
* Create master-slave data source.
*
* @param yamlFile yaml file for master-slave rule configuration with data sources
* @return master-slave data source
* @throws SQLException SQL exception
* @throws IOException IO exception
*/
public static DataSource createDataSource(final File yamlFile) throws SQLException, IOException {
YamlOrchestrationMasterSlaveRuleConfiguration config = unmarshal(yamlFile);
return createDataSource(config.getDataSources(), config.getMasterSlaveRule(), config.getConfigMap(), config.getProps(), config.getOrchestration().getOrchestrationConfiguration());
}
代码示例来源:origin: apache/incubator-shardingsphere
private static void startWithRegistryCenter(final YamlProxyServerConfiguration serverConfig,
final Collection<String> shardingSchemaNames, final Map<String, YamlProxyRuleConfiguration> ruleConfigs, final int port) throws InterruptedException {
try (ShardingOrchestrationFacade shardingOrchestrationFacade = new ShardingOrchestrationFacade(serverConfig.getOrchestration().getOrchestrationConfiguration(), shardingSchemaNames)) {
initShardingOrchestrationFacade(serverConfig, ruleConfigs, shardingOrchestrationFacade);
GlobalRegistry.getInstance().init(getSchemaDataSourceParameterMap(shardingOrchestrationFacade), getSchemaRules(shardingOrchestrationFacade),
shardingOrchestrationFacade.getConfigService().loadAuthentication(), shardingOrchestrationFacade.getConfigService().loadConfigMap(),
shardingOrchestrationFacade.getConfigService().loadProperties(), true);
initOpenTracing();
ShardingProxy.getInstance().start(port);
}
}
代码示例来源:origin: apache/incubator-shardingsphere
private static void startWithRegistryCenter(final YamlProxyServerConfiguration serverConfig,
final Collection<String> shardingSchemaNames, final Map<String, YamlProxyRuleConfiguration> ruleConfigs, final int port) throws InterruptedException {
try (ShardingOrchestrationFacade shardingOrchestrationFacade = new ShardingOrchestrationFacade(serverConfig.getOrchestration().getOrchestrationConfiguration(), shardingSchemaNames)) {
initShardingOrchestrationFacade(serverConfig, ruleConfigs, shardingOrchestrationFacade);
GlobalRegistry.getInstance().init(getSchemaDataSourceParameterMap(shardingOrchestrationFacade), getSchemaRules(shardingOrchestrationFacade),
shardingOrchestrationFacade.getConfigService().loadAuthentication(), shardingOrchestrationFacade.getConfigService().loadConfigMap(),
shardingOrchestrationFacade.getConfigService().loadProperties(), true);
initOpenTracing();
ShardingProxy.getInstance().start(port);
}
}
内容来源于网络,如有侵权,请联系作者删除!