mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for create/destroy scheduler & add testcase
This commit is contained in:
@@ -240,6 +240,7 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
protected DruidDataSourceStatLogger statLogger = new DruidDataSourceStatLoggerImpl();
|
||||
|
||||
private boolean asyncCloseConnectionEnable = false;
|
||||
protected int maxCreateTaskCount = 2;
|
||||
protected ScheduledExecutorService destroyScheduler;
|
||||
protected ScheduledExecutorService createScheduler;
|
||||
|
||||
@@ -1727,4 +1728,18 @@ public abstract class DruidAbstractDataSource extends WrapperAdapter implements
|
||||
public boolean isInited() {
|
||||
return this.inited;
|
||||
}
|
||||
|
||||
|
||||
public int getMaxCreateTaskCount() {
|
||||
return maxCreateTaskCount;
|
||||
}
|
||||
|
||||
|
||||
public void setMaxCreateTaskCount(int maxCreateTaskCount) {
|
||||
if (maxCreateTaskCount < 1) {
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
||||
this.maxCreateTaskCount = maxCreateTaskCount;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user