mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
DruidDataSource onFatalErrorMaxActive support.
This commit is contained in:
@@ -255,6 +255,8 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
|
||||
protected boolean initVariants = false;
|
||||
protected boolean initGlobalVariants = false;
|
||||
protected volatile boolean onFatalError = false;
|
||||
protected volatile int onFatalErrorMaxActive = 0;
|
||||
|
||||
public DruidAbstractDataSource(boolean lockFair){
|
||||
lock = new ReentrantLock(lockFair);
|
||||
@@ -1955,6 +1957,18 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
this.failFast = failFast;
|
||||
}
|
||||
|
||||
public int getOnFatalErrorMaxActive() {
|
||||
return onFatalErrorMaxActive;
|
||||
}
|
||||
|
||||
public void setOnFatalErrorMaxActive(int onFatalErrorMaxActive) {
|
||||
this.onFatalErrorMaxActive = onFatalErrorMaxActive;
|
||||
}
|
||||
|
||||
public boolean isOnFatalError() {
|
||||
return onFatalError;
|
||||
}
|
||||
|
||||
public static class PhysicalConnectionInfo {
|
||||
private Connection connection;
|
||||
private long connectStartNanos;
|
||||
|
||||
Reference in New Issue
Block a user