PruneStrategy encapsulates the entire configuration for pruning, as such it can be difficult to implement complex pruning policies. Previously the connection pool itself restricted pruning such that connection could not be pruned below the minimum pool size. With this patch that logic is moved into the prune strategy allowing any and all available connections to be pruned. As a consequence, the connection pool will now attempt to grow back to its minimum size after pruning is complete. IdlePruneStrategy has been updated to support both a max connection age and a priority. Any connection exceeding the max age duration is removed from the pool. In conjuction with the priority setting, max age cannot also be applied to aggresively prune connections that are less desirable. These settings can provide a guarantee that some or all connections will be eventually recycled when the pool is idle.
PruneStrategy encapsulates the entire configuration for pruning, as such it can be difficult to implement complex pruning policies. Previously the connection pool itself restricted pruning such that connection could not be pruned below the minimum pool size. With this patch that logic is moved into the prune strategy allowing any and all available connections to be pruned. As a consequence, the connection pool will now attempt to grow back to its minimum size after pruning is complete. IdlePruneStrategy has been updated to support both a max connection age and a priority. Any connection exceeding the max age duration is removed from the pool. In conjuction with the priority setting, max age cannot also be applied to aggresively prune connections that are less desirable. These settings can provide a guarantee that some or all connections will be eventually recycled when the pool is idle.