public Optional < String > findActualDefaultDataSourceName ( ) { String defaultDataSourceName = shardingDataSourceNames . getDefaultDataSourceName ( ) ; if ( Strings . isNullOrEmpty ( defaultDataSourceName ) ) { return Optional . absent ( ) ; } Optional < String > masterDefaultDataSourceName = findMasterDataSourceName ( defaultDataSourceName ) ; return masterDefaultDataSourceName . isPresent ( ) ? masterDefaultDataSourceName : Optional . of ( defaultDataSourceName ) ; }
Find actual default data source name .