This commit is contained in:
wenshao
2011-12-09 13:56:17 +08:00
parent bcc6722b50
commit 48c36b5621
3 changed files with 18 additions and 11 deletions
@@ -87,6 +87,12 @@ public class HADataSource extends MultiDataSource implements HADataSourceMBean,
slave.setEnable(value);
}
public void switchMasterSlave() {
DruidDataSource tmp = this.getMaster();
this.setMaster(this.getSlave());
this.setSlave(tmp);
}
public synchronized void setDataSources(List<DruidDataSource> dataSources) {
throw new UnsupportedOperationException();