Package io.netty.resolver.dns
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 List
s.- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Class
<? extends InetAddress> private static final long
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
preferredAddressType
-
-
Constructor Details
-
NameServerComparator
-
-
Method Details
-
compare
- Specified by:
compare
in interfaceComparator<InetSocketAddress>
-