You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/03/28 09:03:52 UTC
[GitHub] [shardingsphere] lanchengx commented on a change in pull request #16432: `SHOW READWRITE_SPLITTING READ RESOURCE` syntax to add delay time display
lanchengx commented on a change in pull request #16432:
URL: https://github.com/apache/shardingsphere/pull/16432#discussion_r836206427
##########
File path: shardingsphere-features/shardingsphere-readwrite-splitting/shardingsphere-readwrite-splitting-core/src/main/java/org/apache/shardingsphere/readwritesplitting/rule/ReadwriteSplittingRule.java
##########
@@ -127,18 +128,19 @@ public void updateStatus(final DataSourceStatusChangedEvent event) {
@Override
public Map<String, Supplier<Object>> getExportedMethods() {
- Map<String, Supplier<Object>> result = new HashMap<>(3, 1);
- result.put(ExportableConstants.EXPORTABLE_KEY_AUTO_AWARE_DATA_SOURCE, () -> exportDataSource(DYNAMIC));
+ Map<String, Supplier<Object>> result = new HashMap<>(4, 1);
+ result.put(ExportableConstants.EXPORTABLE_KEY_AUTO_AWARE_DATA_SOURCE, () -> exportDataSource(false, DYNAMIC));
result.put(ExportableConstants.EXPORTABLE_KEY_AUTO_AWARE_DATA_SOURCE_NAME, this::exportAutoAwareDataSourceNames);
- result.put(ExportableConstants.EXPORTABLE_KEY_DATA_SOURCE, () -> exportDataSource(STATIC));
+ result.put(ExportableConstants.EXPORTABLE_KEY_ENABLED_DATA_SOURCE, () -> exportDataSource(true, STATIC));
+ result.put(ExportableConstants.EXPORTABLE_KEY_DATA_SOURCE, () -> exportDataSource(false, DYNAMIC, STATIC));
return result;
}
- private Map<String, Map<String, String>> exportDataSource(final String readwriteSplittingType) {
- Map<String, Map<String, String>> result = new HashMap<>(dataSourceRules.size(), 1);
+ private Map<String, Map<String, String>> exportDataSource(final boolean removeDisabled, final String... readwriteSplittingType) {
Review comment:
it might need a better name
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org