Skip to content

Commit

Permalink
Refactor YamlDatabaseConfigurationImportExecutor
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Oct 4, 2023
1 parent 29d82e8 commit e9dc51f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,10 +289,10 @@ private void addBroadcastRuleConfiguration(final BroadcastRuleConfiguration broa
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getStorageUnit().getDataSource(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new))));
}

private void addSingleRuleConfiguration(final SingleRuleConfiguration broadcastRuleConfig, final Collection<RuleConfiguration> allRuleConfigs, final ShardingSphereDatabase database) {
allRuleConfigs.add(broadcastRuleConfig);
private void addSingleRuleConfiguration(final SingleRuleConfiguration singleRuleConfig, final Collection<RuleConfiguration> allRuleConfigs, final ShardingSphereDatabase database) {
allRuleConfigs.add(singleRuleConfig);
database.getRuleMetaData().getRules().add(
new SingleRule(broadcastRuleConfig, database.getName(),
new SingleRule(singleRuleConfig, database.getName(),
database.getResourceMetaData().getStorageUnitMetaDataMap().entrySet().stream()
.collect(Collectors.toMap(Entry::getKey, entry -> entry.getValue().getStorageUnit().getDataSource(), (oldValue, currentValue) -> oldValue, LinkedHashMap::new)),
database.getRuleMetaData().getRules()));
Expand Down

0 comments on commit e9dc51f

Please sign in to comment.