PoolUtils.prefill

Calls {@link KeyedObjectPool#addObject(Object)} on <code>keyedPool</code> with each key in <code>keys</code> for <code>count</code> number of times. This has the same effect as calling {@link #prefill(KeyedObjectPool, Object, int)} for each key in the <code>keys</code> collection.

@param keyedPool the keyedPool to prefill. @param keys {@link Collection} of keys to add objects for. @param count the number of idle objects to add for each <code>key</code>. @param <K> the type of the pool key @param <V> the type of pool entries @throws Exception when {@link KeyedObjectPool#addObject(Object)} fails. @throws IllegalArgumentException when <code>keyedPool</code>, <code>keys</code>, or any value in <code>keys</code> is <code>null</code>. @see #prefill(KeyedObjectPool, Object, int)

  1. void prefill(ObjectPool!(T) pool, int count)
  2. void prefill(KeyedObjectPool!(K, V) keyedPool, K key, int count)
  3. void prefill(KeyedObjectPool!(K, V) keyedPool, Collection!(K) keys, int count)
    class PoolUtils
    static
    void
    prefill
    (
    K
    V
    )
    (
    KeyedObjectPool!(K, V) keyedPool
    ,
    Collection!(K) keys
    ,
    int count
    )

Meta