GenericKeyedObjectPool.returnObject

Returns an object to a keyed sub-pool. <p> If {@link #getMaxIdlePerKey() maxIdle} is set to a positive value and the number of idle instances under the given key has reached this value, the returning instance is destroyed. <p> If {@link #getTestOnReturn() testOnReturn} == true, the returning instance is validated before being returned to the idle instance sub-pool under the given key. In this case, if validation fails, the instance is destroyed. <p> Exceptions encountered destroying objects for any reason are swallowed but notified via a {@link SwallowedExceptionListener}.

@param key pool key @param obj instance to return to the keyed pool

@throws IllegalStateException if an object is returned to the pool that was not borrowed from it or if an object is returned to the pool multiple times

class GenericKeyedObjectPool(K, T)
override
void
returnObject
(
K key
,
T obj
)

Meta