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

How to use
loadShardingRuleConfiguration
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.loadShardingRuleConfiguration (Showing top 4 results out of 315)

origin: apache/incubator-shardingsphere

private RuleConfiguration createRuleConfiguration(final String shardingSchemaName) {
  return configurationService.isShardingRule(shardingSchemaName) 
      ? configurationService.loadShardingRuleConfiguration(shardingSchemaName) : configurationService.loadMasterSlaveRuleConfiguration(shardingSchemaName);
}

origin: apache/incubator-shardingsphere

private static Map<String, RuleConfiguration> getSchemaRules(final ShardingOrchestrationFacade shardingOrchestrationFacade) {
  Map<String, RuleConfiguration> result = new LinkedHashMap<>();
  for (String each : shardingOrchestrationFacade.getConfigService().getAllShardingSchemaNames()) {
    if (shardingOrchestrationFacade.getConfigService().isShardingRule(each)) {
      result.put(each, shardingOrchestrationFacade.getConfigService().loadShardingRuleConfiguration(each));
    } else {
      result.put(each, shardingOrchestrationFacade.getConfigService().loadMasterSlaveRuleConfiguration(each));
    }
  }
  return result;
}

origin: apache/incubator-shardingsphere

private static Map<String, RuleConfiguration> getSchemaRules(final ShardingOrchestrationFacade shardingOrchestrationFacade) {
  Map<String, RuleConfiguration> result = new LinkedHashMap<>();
  for (String each : shardingOrchestrationFacade.getConfigService().getAllShardingSchemaNames()) {
    if (shardingOrchestrationFacade.getConfigService().isShardingRule(each)) {
      result.put(each, shardingOrchestrationFacade.getConfigService().loadShardingRuleConfiguration(each));
    } else {
      result.put(each, shardingOrchestrationFacade.getConfigService().loadMasterSlaveRuleConfiguration(each));
    }
  }
  return result;
}

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

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

Javadoc

Load sharding rule configuration.

Popular methods of ConfigurationService

  • loadDataSourceConfigurations
    Load data source configurations.
  • loadMasterSlaveRuleConfiguration
    Load master-slave rule configuration.
  • getAllShardingSchemaNames
    Get all sharding schema names.
  • isShardingRule
    Judge is sharding rule or master-slave rule.
  • loadConfigMap
    Load config map.
  • 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

  • Reading from database using SQL prepared statement
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • Menu (java.awt)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • Github Copilot 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