Class DnsServerAddresses
java.lang.Object
io.netty.resolver.dns.DnsServerAddresses
Provides an infinite sequence of DNS server addresses to
DnsNameResolver.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DnsServerAddressesDeprecated.static List<InetSocketAddress> Deprecated.static DnsServerAddressesrotational(Iterable<? extends InetSocketAddress> addresses) Returns theDnsServerAddressesthat yields the specifiedaddressesin a rotational sequential order.static DnsServerAddressesrotational(InetSocketAddress... addresses) Returns theDnsServerAddressesthat yields the specifiedaddressesin a rotational sequential order.static DnsServerAddressessequential(Iterable<? extends InetSocketAddress> addresses) Returns theDnsServerAddressesthat yields the specifiedaddressessequentially.static DnsServerAddressessequential(InetSocketAddress... addresses) Returns theDnsServerAddressesthat yields the specifiedaddressessequentially.static DnsServerAddressesshuffled(Iterable<? extends InetSocketAddress> addresses) Returns theDnsServerAddressesthat yields the specifiedaddressin a shuffled order.static DnsServerAddressesshuffled(InetSocketAddress... addresses) Returns theDnsServerAddressesthat yields the specifiedaddressesin a shuffled order.static DnsServerAddressessingleton(InetSocketAddress address) Returns theDnsServerAddressesthat yields only a singleaddress.abstract DnsServerAddressStreamstream()Starts a new infinite stream of DNS server addresses.
-
Constructor Details
-
DnsServerAddresses
public DnsServerAddresses()
-
-
Method Details
-
defaultAddressList
Deprecated.UseDefaultDnsServerAddressStreamProvider.defaultAddressList().Returns the list of the system DNS server addresses. If it failed to retrieve the list of the system DNS server addresses from the environment, it will return
"8.8.8.8"and"8.8.4.4", the addresses of the Google public DNS servers. -
defaultAddresses
Deprecated.UseDefaultDnsServerAddressStreamProvider.defaultAddresses().Returns the
DnsServerAddressesthat yields the system DNS server addresses sequentially. If it failed to retrieve the list of the system DNS server addresses from the environment, it will use"8.8.8.8"and"8.8.4.4", the addresses of the Google public DNS servers.This method has the same effect with the following code:
DnsServerAddresses.sequential(DnsServerAddresses.defaultAddressList());
-
sequential
Returns theDnsServerAddressesthat yields the specifiedaddressessequentially. Once the last address is yielded, it will start again from the first address. -
sequential
Returns theDnsServerAddressesthat yields the specifiedaddressessequentially. Once the last address is yielded, it will start again from the first address. -
shuffled
Returns theDnsServerAddressesthat yields the specifiedaddressin a shuffled order. Once all addresses are yielded, the addresses are shuffled again. -
shuffled
Returns theDnsServerAddressesthat yields the specifiedaddressesin a shuffled order. Once all addresses are yielded, the addresses are shuffled again. -
rotational
Returns theDnsServerAddressesthat yields the specifiedaddressesin a rotational sequential order. It is similar tosequential(Iterable), but eachDnsServerAddressStreamstarts from a different starting point. For example, the firststream()will start from the first address, the second one will start from the second address, and so on. -
rotational
Returns theDnsServerAddressesthat yields the specifiedaddressesin a rotational sequential order. It is similar tosequential(Iterable), but eachDnsServerAddressStreamstarts from a different starting point. For example, the firststream()will start from the first address, the second one will start from the second address, and so on. -
singleton
Returns theDnsServerAddressesthat yields only a singleaddress. -
stream
Starts a new infinite stream of DNS server addresses. This method is invoked byDnsNameResolveron every uncachedSimpleNameResolver.resolve(String)orSimpleNameResolver.resolveAll(String).
-
DefaultDnsServerAddressStreamProvider.defaultAddresses().