GenericKeyedObjectPool.setMaxIdlePerKey

Sets the cap on the number of "idle" instances per key in the pool. If maxIdlePerKey is set too low on heavily loaded systems it is possible you will see objects being destroyed and almost immediately new objects being created. This is a result of the active threads momentarily returning objects faster than they are requesting them, causing the number of idle objects to rise above maxIdlePerKey. The best value for maxIdlePerKey for heavily loaded system will vary but the default is a good starting point.

@param maxIdlePerKey the maximum number of "idle" instances that can be held in a given keyed sub-pool. Use a negative value for no limit

@see #getMaxIdlePerKey

class GenericKeyedObjectPool(K, T)
void
setMaxIdlePerKey

Meta