PoolUtils.erodingPool
- ObjectPool!(T) erodingPool(ObjectPool!(T) pool)
class PoolUtils
static
ObjectPool!(T)
erodingPool
- ObjectPool!(T) erodingPool(ObjectPool!(T) pool, float factor)
- KeyedObjectPool!(K, V) erodingPool(KeyedObjectPool!(K, V) keyedPool)
- KeyedObjectPool!(K, V) erodingPool(KeyedObjectPool!(K, V) keyedPool, float factor)
- KeyedObjectPool!(K, V) erodingPool(KeyedObjectPool!(K, V) keyedPool, float factor, bool perKey)
hunt pool PoolUtils PoolUtils
constructorsstatic functions
Returns a pool that adaptively decreases its size when idle objects are no longer needed. This is intended as an always thread-safe alternative to using an idle object evictor provided by many pool implementations. This is also an effective way to shrink FIFO ordered pools that experience load spikes.
@param pool the ObjectPool to be decorated so it shrinks its idle count when possible. @param <T> the type of objects in the pool @return a pool that adaptively decreases its size when idle objects are no longer needed. @see #erodingPool(ObjectPool, float)