Class PoolUtils.ErodingPerKeyKeyedObjectPool<K,V>

java.lang.Object
org.apache.commons.pool.PoolUtils.ErodingKeyedObjectPool<K,V>
org.apache.commons.pool.PoolUtils.ErodingPerKeyKeyedObjectPool<K,V>
All Implemented Interfaces:
KeyedObjectPool<K,V>
Enclosing class:
PoolUtils

private static class PoolUtils.ErodingPerKeyKeyedObjectPool<K,V> extends PoolUtils.ErodingKeyedObjectPool<K,V>
Extends ErodingKeyedObjectPool to allow erosion to take place on a per-key basis. Timing of erosion events is tracked separately for separate keyed pools.
  • Field Details

    • factor

      private final float factor
      Erosion factor - same for all pools
    • factors

      private final Map<K,PoolUtils.ErodingFactor> factors
      Map of ErodingFactor instances keyed on pool keys
  • Constructor Details

    • ErodingPerKeyKeyedObjectPool

      public ErodingPerKeyKeyedObjectPool(KeyedObjectPool<K,V> keyedPool, float factor)
      Create a new ErordingPerKeyKeyedObjectPool decorating the given keyed pool with the specified erosion factor.
      Parameters:
      keyedPool - underlying keyed pool
      factor - erosion factor
  • Method Details