DruidDataSource add property phyMaxUseCount & shrinkQuietly.

This commit is contained in:
wenshao
2018-09-19 11:33:45 +08:00
parent 7f26a37432
commit 7aad235c3c
4 changed files with 67 additions and 2 deletions
@@ -145,6 +145,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
protected volatile long minEvictableIdleTimeMillis = DEFAULT_MIN_EVICTABLE_IDLE_TIME_MILLIS;
protected volatile long maxEvictableIdleTimeMillis = DEFAULT_MAX_EVICTABLE_IDLE_TIME_MILLIS;
protected volatile long phyTimeoutMillis = DEFAULT_PHY_TIMEOUT_MILLIS;
protected volatile long phyMaxUseCount = -1;
protected volatile boolean removeAbandoned;
protected volatile long removeAbandonedTimeoutMillis = 300 * 1000;
@@ -779,6 +780,14 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
this.phyTimeoutMillis = phyTimeoutMillis;
}
public long getPhyMaxUseCount() {
return phyMaxUseCount;
}
public void setPhyMaxUseCount(long phyMaxUseCount) {
this.phyMaxUseCount = phyMaxUseCount;
}
public int getNumTestsPerEvictionRun() {
return numTestsPerEvictionRun;
}