java-cloudant shutdown() and connection pool question
java-cloudant shutdown() and connection pool question
I noticed that there is a CloudantClient.shutdown()
method in the java-cloudant library.
CloudantClient.shutdown()
Is this call required to end the connection to Cloudant gracefully, and if so, where should I call this?
I am connecting to Cloudant through a singleton implementation, since the client itself does connection pooling inherently.
My second question is more about how the connection pooling works.
I'm assuming that once a connection is pulled from the pool, it is kept alive for however long the keep-alive time is (I think 3 minutes).
Does this mean that all the connection pool management is done in the background by the library, and we don't need to worry about releasing connections, making new connections, etc.?
We would just simply make calls with the client.
Are already open connections prioritized to be used rather than pulling a new connection from the pool?
0
Thanks for contributing an answer to Stack Overflow!
But avoid …
To learn more, see our tips on writing great answers.
Required, but never shown
Required, but never shown
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.