Tabnine Logo
ConfigurationService.loadConfigMap
Code IndexAdd Tabnine to your IDE (free)

How to use
loadConfigMap
method
in
org.apache.shardingsphere.orchestration.internal.registry.config.service.ConfigurationService

Best Java code snippets using org.apache.shardingsphere.orchestration.internal.registry.config.service.ConfigurationService.loadConfigMap (Showing top 4 results out of 315)

origin: apache/incubator-shardingsphere

public OrchestrationShardingDataSource(final OrchestrationConfiguration orchestrationConfig) throws SQLException {
  super(new ShardingOrchestrationFacade(orchestrationConfig, Collections.singletonList(ShardingConstant.LOGIC_SCHEMA_NAME)));
  ConfigurationService configService = getShardingOrchestrationFacade().getConfigService();
  ShardingRuleConfiguration shardingRuleConfig = configService.loadShardingRuleConfiguration(ShardingConstant.LOGIC_SCHEMA_NAME);
  Preconditions.checkState(null != shardingRuleConfig && !shardingRuleConfig.getTableRuleConfigs().isEmpty(), "Missing the sharding rule configuration on registry center");
  dataSource = new ShardingDataSource(DataSourceConverter.getDataSourceMap(configService.loadDataSourceConfigurations(ShardingConstant.LOGIC_SCHEMA_NAME)),
      new OrchestrationShardingRule(shardingRuleConfig, configService.loadDataSourceConfigurations(ShardingConstant.LOGIC_SCHEMA_NAME).keySet()),
      configService.loadConfigMap(), configService.loadProperties());
  getShardingOrchestrationFacade().init();
}

origin: apache/incubator-shardingsphere

public OrchestrationMasterSlaveDataSource(final OrchestrationConfiguration orchestrationConfig) throws SQLException {
  super(new ShardingOrchestrationFacade(orchestrationConfig, Collections.singletonList(ShardingConstant.LOGIC_SCHEMA_NAME)));
  ConfigurationService configService = getShardingOrchestrationFacade().getConfigService();
  MasterSlaveRuleConfiguration masterSlaveRuleConfig = configService.loadMasterSlaveRuleConfiguration(ShardingConstant.LOGIC_SCHEMA_NAME);
  Preconditions.checkState(null != masterSlaveRuleConfig && !Strings.isNullOrEmpty(masterSlaveRuleConfig.getMasterDataSourceName()), "No available master slave rule configuration to load.");
  dataSource = new MasterSlaveDataSource(DataSourceConverter.getDataSourceMap(configService.loadDataSourceConfigurations(ShardingConstant.LOGIC_SCHEMA_NAME)),
      new OrchestrationMasterSlaveRule(masterSlaveRuleConfig), configService.loadConfigMap(), configService.loadProperties());
  getShardingOrchestrationFacade().init();
}

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);
  }
}

org.apache.shardingsphere.orchestration.internal.registry.config.serviceConfigurationServiceloadConfigMap

Javadoc

Load config map.

Popular methods of ConfigurationService

  • loadDataSourceConfigurations
    Load data source configurations.
  • loadMasterSlaveRuleConfiguration
    Load master-slave rule configuration.
  • loadShardingRuleConfiguration
    Load sharding rule configuration.
  • getAllShardingSchemaNames
    Get all sharding schema names.
  • isShardingRule
    Judge is sharding rule or master-slave rule.
  • loadProperties
    Load properties configuration.
  • loadAuthentication
    Load authentication.
  • <init>
  • hasAuthentication
  • hasConfigMap
  • hasDataSourceConfiguration
    Judge whether schema has data source configuration.
  • hasProperties
  • hasDataSourceConfiguration,
  • hasProperties,
  • hasRuleConfiguration,
  • persistAuthentication,
  • persistConfigMap,
  • persistConfiguration,
  • persistDataSourceConfiguration,
  • persistMasterSlaveRuleConfiguration,
  • persistProperties

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now