Reputation: 37088
I create an LDAPConnectionPool the following way:
LDAPConnectionPool(
connection,
1,
20,
StartTLSPostConnectProcessor(getSslContext()),
).let {
it.createIfNecessary = false
}
As far as I understand the LDAPConnectionPool will create 20 objects of type LDAPConnection during heavy load. After that the pool won't decrease the amount of connections, even if the load will be really low for a long period of time. Is there way to configure pool to achieve it?
In Java we have Executors.newCachedThreadPool()
which reflects functionality I described above. keepAliveTime
parameter defines when to kill idle thread.
Upvotes: 0
Views: 45