mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-13 13:35:54 +00:00
This commit introduces the DistributedProxySelector class, which enables efficient and thread-safe proxy selection among multiple ProxySelector instances. The new class ensures proper distribution of proxy selector usage with the help of AtomicInteger and maintains thread safety using ThreadLocal. Key features and improvements: Distributes proxy selection among multiple ProxySelector instances Ensures thread safety by using ThreadLocal<ProxySelector> Properly handles exceptions and connection failures Comprehensive JavaDoc documentation for class, methods, and variables Includes unit tests for various scenarios and edge cases This new functionality provides a robust and efficient solution for distributing proxy selection in multi-threaded environments, improving the overall performance and reliability of the system.