mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
revert
This commit is contained in:
@@ -1185,28 +1185,6 @@ public class DruidDataSource extends DruidAbstractDataSource implements DruidDat
|
||||
}
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
final List<ConnectionHolder> evictList = new ArrayList<ConnectionHolder>();
|
||||
|
||||
lock.lock();
|
||||
try {
|
||||
for (int i = 0; i < poolingCount; ++i) {
|
||||
ConnectionHolder connection = connections[i];
|
||||
evictList.add(connection);
|
||||
}
|
||||
|
||||
poolingCount = 0;
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
||||
for (ConnectionHolder item : evictList) {
|
||||
Connection connection = item.getConnection();
|
||||
JdbcUtils.close(connection);
|
||||
destroyCount++;
|
||||
}
|
||||
}
|
||||
|
||||
public int getWaitThreadCount() {
|
||||
lock.lock();
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user