vt-middleware / ldaptive

A simple, extensible Java API for interacting with LDAP servers
56 stars 26 forks source link

Open and close pool connections asychronously. #225

Closed dfish3r closed 1 year ago

dfish3r commented 2 years ago

Add CallableWorker class to encapsulate the details of submitting and processing tasks on a thread pool. Update AbstractConnectionPool to leverage CallableWorker for both opening and closing connections. Update AbstractConnectionPool to leverage CallableWorker for pruning connections.

This patch changes functionality in both the create and prune use cases. Prior these would execute sequentially and make a best effort by exaimining the pool after each attempt. Now these calculate the number of attempts upfront and then make exactly that number of attempts. The greatest impact of this change is likely on failFast pools need a few extra creation attempts; those will now fail initialize.

Use consistent naming for threads created by ldaptive. See #224

dfish3r commented 1 year ago

Pushed fixes to address the change in functionality for open and prune. The new implementation is now equivalent in both cases.