mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
ha
This commit is contained in:
@@ -78,6 +78,22 @@ public class HADataSource extends MultiDataSource implements HADataSourceMBean,
|
||||
|
||||
return master.isEnable();
|
||||
}
|
||||
|
||||
public boolean isMasterFail() {
|
||||
if (master == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return master.isFail();
|
||||
}
|
||||
|
||||
public boolean isSlaveFail() {
|
||||
if (slave == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return slave.isFail();
|
||||
}
|
||||
|
||||
public void setMasterEnable(boolean value) {
|
||||
if (master == null) {
|
||||
|
||||
Reference in New Issue
Block a user