This commit is contained in:
wenshao
2011-12-21 13:19:23 +08:00
parent bdba952244
commit 63ae20662e
7 changed files with 116 additions and 22 deletions
@@ -114,6 +114,30 @@ public class HADataSource extends MultiDataSource implements HADataSourceMBean,
return slave.getUrl();
}
public int getMasterWeight() {
return master.getWeight();
}
public int getSlaveWeight() {
return slave.getWeight();
}
public int getMasterWeightRegionBegin() {
return master.getWeightRegionBegin();
}
public int getMasterWeightRegionEnd() {
return master.getWeightRegionEnd();
}
public int getSlaveWeightRegionBegin() {
return slave.getWeightRegionBegin();
}
public int getSlaveWeightRegionEnd() {
return slave.getWeightRegionEnd();
}
public boolean isSlaveEnable() {
if (slave == null) {