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

How to use
loadMasterSlaveRuleConfiguration
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.loadMasterSlaveRuleConfiguration (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 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();
}

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

Javadoc

Load master-slave rule configuration.

Popular methods of ConfigurationService

  • loadDataSourceConfigurations
    Load data source configurations.
  • loadShardingRuleConfiguration
    Load sharding 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

  • Creating JSON documents from java classes using gson
  • putExtra (Intent)
  • findViewById (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JComboBox (javax.swing)
  • Top plugins for Android Studio
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