refactor the codes related to DataSourceSelector

This commit is contained in:
DigitalSonic
2019-02-02 17:23:13 +08:00
parent dfcc16107a
commit bd87a038be
7 changed files with 70 additions and 20 deletions
@@ -167,11 +167,9 @@ public class HighAvailableDataSource extends WrapperAdapter implements DataSourc
}
public void setSelector(String name) {
if (name != null && this.selector != null && this.selector.isSame(name)) {
return;
}
DataSourceSelector selector = DataSourceSelectorFactory.getSelector(name, this);
if (selector != null) {
selector.init();
setDataSourceSelector(selector);
}
}