gpt4 book ai didi

org.apache.shardingsphere.orchestration.yaml.config.YamlOrchestrationConfiguration.getOrchestrationConfiguration()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-15 23:59:31 27 4
gpt4 key购买 nike

本文整理了Java中org.apache.shardingsphere.orchestration.yaml.config.YamlOrchestrationConfiguration.getOrchestrationConfiguration()方法的一些代码示例,展示了YamlOrchestrationConfiguration.getOrchestrationConfiguration()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YamlOrchestrationConfiguration.getOrchestrationConfiguration()方法的具体详情如下:
包路径:org.apache.shardingsphere.orchestration.yaml.config.YamlOrchestrationConfiguration
类名称:YamlOrchestrationConfiguration
方法名:getOrchestrationConfiguration

YamlOrchestrationConfiguration.getOrchestrationConfiguration介绍

[英]Get orchestration configuration from 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);
  }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com