Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTPCLIENT-2318 - Enhance PoolingHttpClientConnectionManager with isShutdown State Check. #549

Merged
merged 1 commit into from
Feb 23, 2024

Conversation

arturobernalg
Copy link
Member

This PR addresses the issue described in HTTPCLIENT-2318 by enhancing the PoolingHttpClientConnectionManager. It introduces an isShutdown method for clear state checking and refines the close method for improved resource management, aiming to improve usability and reliability without affecting backward compatibility.

@ok2c
Copy link
Member

ok2c commented Feb 21, 2024

@arturobernalg Curiously enough I found this commit 6ba9b4a you contributed in the past. Could you please make sure all 3 conn manager implementations are consistent?

@arturobernalg
Copy link
Member Author

conn manager implementations are consistent

@ok2c , absolutely. Thank you for pointing that out.

* @return {@code true} if the connection manager has been shut down and is closed, otherwise
* return {@code false}.
*/
boolean isClosed() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Should not the method be public?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ok2c changed.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@arturobernalg Could you please add @since tags to the new public methods? Everything is OK otherwise.

…hutdown State Check.

This commit introduces an `isShutdown` method to the `PoolingHttpClientConnectionManager` class, providing a thread-safe way to check whether the connection manager has been closed. The addition leverages an existing `AtomicBoolean` closed flag to ensure that the shutdown state can be queried reliably in concurrent environments.
@ok2c ok2c merged commit 407b915 into apache:master Feb 23, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants