netty5/resolver/src
Dmitry Spikhalskiy 5eebe9a06c Implement RoundRobin logic in RoundRobinInetAddressResolver#resolveAll
Motivation:
Now the ```resolveAll``` method of RoundRobinInetAddressResolver returns results without any rotation and shuffling. As a result, it doesn't force any round-robin for clients that get a result of ```resolveAll``` and use addresses from the result one by one for a connection establishing until success. This commit implements round-robin in RoundRobinInetAddressResolver#resolveAll. These improvements inspired by the discussion here: https://github.com/AsyncHttpClient/async-http-client/issues/1285

Modifications:
Rotate collection from internal ```resolveAll``` call by index, which is incremented every call to RoundRobinInetAddressResolver#resolveAll method.
Random replaced by an incrementing counter, which makes code cheaper and guarantees predictable address order in tests.

Result:
Improved ```RoundRobinInetAddressResolver``` is compatible with clients that use ```resolveAll``` result.
2016-11-04 15:47:02 +01:00
..
main/java/io/netty/resolver Implement RoundRobin logic in RoundRobinInetAddressResolver#resolveAll 2016-11-04 15:47:02 +01:00
test/java/io/netty/resolver [#5308] Ensure InetSocketAddressResolver.close() will close the wrapped NameResolver. 2016-06-03 21:41:22 +02:00