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:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Constructor Details
-
NameServerComparator
-
-
Method Details
-
compare
- Specified by:
comparein interfaceComparator<InetSocketAddress>
-