GenericKeyedObjectPool.getMaxIdlePerKey

Returns 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.

@return the maximum number of "idle" instances that can be held in a given keyed sub-pool or a negative value if there is no limit

@see #setMaxIdlePerKey

class GenericKeyedObjectPool(K, T)
override
int
getMaxIdlePerKey
()

Meta