Apache Commons Pool API provides an object pool and a series of objects pool implementation.
Compared with the 1.x series, Apache Commons Pool 2.x includes a complete rewrite of the pool implementation. In addition to improved performance and scalability, further comprising a strong 2.x instance tracking and monitoring of the pool, the requirements JDK 1.6 and above.
Apache Commons Pool 2.8.0 update:
New features
- POOL-378: deprecated PoolUtils.prefill (ObjectPool, int), and recommended ObjectPool.addObjects (int)
- POOL-379: deprecated PoolUtils.prefill (KeyedObjectPool, K, int), and recommended KeyedObjectPool.addObjects (K, int)
- POOL-380: recommended KeyedObjectPool.addObjects (Collection, int), deprecated PoolUtils.prefill (KeyedObjectPool, Collection, int)
Bug fixes
- POOL-374: When the key is not found in the pool mapping, org.apache.commons.pool2.impl.GenericKeyedObjectPool.returnObject (K, T) should throw IllegalStateException instead of NullPointerException
- POOL-376: Fix regression POOL-356 original repair, the problem could lead to the destruction of the object at the time of NPE
- POOL-326: Due to prematurely delete a key pool, thus eliminating the NPE / ISE abnormal
- Before calling the toString basis BufferedOutputStream, turn off BufferedOutputStream in the test
- [Javadoc] Add the missing @throws comments in the SoftReferenceObjectPool
For details, see update instructions .