Returns a synchronized (thread-safe) KeyedObjectPool backed by the
specified KeyedObjectPool.
<p>
<b>Note:</b> This should not be used on pool implementations that already
provide proper synchronization such as the pools provided in the Commons
Pool library. Wrapping a pool that {@link #wait() waits} for poolable
objects to be returned before allowing another one to be borrowed with
another layer of synchronization will cause liveliness issues or a
deadlock.
</p>
@param keyedPool
the KeyedObjectPool to be "wrapped" in a synchronized
KeyedObjectPool.
@param <K> the type of the pool key
@param <V> the type of pool entries
@return a synchronized view of the specified KeyedObjectPool.
Returns a synchronized (thread-safe) KeyedObjectPool backed by the specified KeyedObjectPool. <p> <b>Note:</b> This should not be used on pool implementations that already provide proper synchronization such as the pools provided in the Commons Pool library. Wrapping a pool that {@link #wait() waits} for poolable objects to be returned before allowing another one to be borrowed with another layer of synchronization will cause liveliness issues or a deadlock. </p>
@param keyedPool the KeyedObjectPool to be "wrapped" in a synchronized KeyedObjectPool. @param <K> the type of the pool key @param <V> the type of pool entries @return a synchronized view of the specified KeyedObjectPool.