Class NameServerComparator

java.lang.Object
io.netty.resolver.dns.NameServerComparator
All Implemented Interfaces:
Serializable, Comparator<InetSocketAddress>

public final class NameServerComparator extends Object implements Comparator<InetSocketAddress>, Serializable
Special Comparator implementation to sort the nameservers to use when follow redirects. This implementation follows all the semantics listed in the Comparator apidocs with the limitation that InetSocketAddress.equals(Object) will not result in the same return value as compare(InetSocketAddress, InetSocketAddress). This is completely fine as this should only be used to sort Lists.
See Also: