mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed sql runningCount & add statLog support
This commit is contained in:
@@ -210,7 +210,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
|
||||
private ObjectName objectName;
|
||||
|
||||
private final AtomicLong executeCount = new AtomicLong();
|
||||
protected final AtomicLong executeCount = new AtomicLong();
|
||||
|
||||
protected volatile Throwable createError;
|
||||
protected volatile Throwable lastError;
|
||||
@@ -231,7 +231,10 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
|
||||
private Boolean useUnfairLock = null;
|
||||
|
||||
private boolean useLocalSessionState = true;
|
||||
private boolean useLocalSessionState = true;
|
||||
|
||||
protected long timeBetweenLogStatsMillis;
|
||||
protected DruidDataSourceStatLogger statLogger = new DruidDataSourceStatLoggerImpl();
|
||||
|
||||
public DruidAbstractDataSource(boolean lockFair){
|
||||
lock = new ReentrantLock(lockFair);
|
||||
@@ -239,15 +242,23 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
notEmpty = lock.newCondition();
|
||||
empty = lock.newCondition();
|
||||
}
|
||||
|
||||
|
||||
public boolean isUseLocalSessionState() {
|
||||
return useLocalSessionState;
|
||||
}
|
||||
|
||||
|
||||
public void setUseLocalSessionState(boolean useLocalSessionState) {
|
||||
this.useLocalSessionState = useLocalSessionState;
|
||||
}
|
||||
|
||||
public long getTimeBetweenLogStatsMillis() {
|
||||
return timeBetweenLogStatsMillis;
|
||||
}
|
||||
|
||||
public void setTimeBetweenLogStatsMillis(long timeBetweenLogStatsMillis) {
|
||||
this.timeBetweenLogStatsMillis = timeBetweenLogStatsMillis;
|
||||
}
|
||||
|
||||
public boolean isOracle() {
|
||||
return isOracle;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user