druid/doc/druid-pool.txt

29 lines
1.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

ConnectionPool
|---------------------------|
| |
getConnection | |
(notEmpty.await) | |
(lowWater.signal) | |
(maxActive.await) | |
<-------------------------- | |
<-------------------------- | |
<-------------------------- | |
| |
| |
--------------------------> | |
--------------------------> | | 销毁多余连接的线程
--------------------------> | | (highWater.await, idleTimeout.await)
close | | -------------------------------------->
(highWater.signal) | |
(maxActive.signal) | |
| |
| |
产生连接的线程 | |
(lowWater.await) | |
(notEmpty.signal) | |
--------------------------> | |
| |
|---------------------------|
五个ConditionnotEmpty、maxActive、lowWater、highWater, idleTime