Skip to content

Commit

Permalink
Refactor StorageResourceUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
terrymanu committed Sep 27, 2023
1 parent be9b6fb commit 89046ba
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,7 @@ public static Map<String, StorageUnitNodeMapper> getStorageUnitNodeMappers(final
.collect(Collectors.toMap(Entry::getKey, entry -> getStorageUnitNodeMapper(entry.getKey(), entry.getValue()), (oldValue, currentValue) -> currentValue, LinkedHashMap::new));
}

/**
* Get storage unit node mapper from provided data source.
*
* @param dataSourceName data source name
* @param dataSource data source
* @return storage unit node mapper
*/
public static StorageUnitNodeMapper getStorageUnitNodeMapper(final String dataSourceName, final DataSource dataSource) {
private static StorageUnitNodeMapper getStorageUnitNodeMapper(final String dataSourceName, final DataSource dataSource) {
DataSourcePoolProperties props = DataSourcePoolPropertiesCreator.create(dataSource);
String url = props.getConnectionPropertySynonyms().getStandardProperties().get("url").toString();
return new StorageUnitNodeMapper(dataSourceName, new StorageNode(dataSourceName), url);
Expand Down

0 comments on commit 89046ba

Please sign in to comment.