@ Subscribe public final synchronized void renew ( final DataSourceChangedEvent dataSourceChangedEvent ) throws Exception { if ( ! name . equals ( dataSourceChangedEvent . getShardingSchemaName ( ) ) ) { return ; } backendDataSource . close ( ) ; dataSources . clear ( ) ; dataSources . putAll ( DataSourceConverter . getDataSourceParameterMap ( dataSourceChangedEvent . getDataSourceConfigurations ( ) ) ) ; backendDataSource = new JDBCBackendDataSource ( dataSources ) ; }
Renew data source configuration .