public abstract class DnsServerAddresses extends Object
DnsNameResolver
.Constructor and Description |
---|
DnsServerAddresses() |
Modifier and Type | Method and Description |
---|---|
static DnsServerAddresses |
defaultAddresses()
Deprecated.
Use
DefaultDnsServerAddressStreamProvider.defaultAddresses() .
Returns the This method has the same effect with the following code: DnsServerAddresses.sequential(DnsServerAddresses.defaultAddressList()); |
static List<InetSocketAddress> |
defaultAddressList()
Deprecated.
Use
DefaultDnsServerAddressStreamProvider.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 |
static DnsServerAddresses |
rotational(InetSocketAddress... addresses)
Returns the
DnsServerAddresses that yields the specified addresses in a rotational sequential
order. |
static DnsServerAddresses |
rotational(Iterable<? extends InetSocketAddress> addresses)
Returns the
DnsServerAddresses that yields the specified addresses in a rotational sequential
order. |
static DnsServerAddresses |
sequential(InetSocketAddress... addresses)
Returns the
DnsServerAddresses that yields the specified addresses sequentially. |
static DnsServerAddresses |
sequential(Iterable<? extends InetSocketAddress> addresses)
Returns the
DnsServerAddresses that yields the specified addresses sequentially. |
static DnsServerAddresses |
shuffled(InetSocketAddress... addresses)
Returns the
DnsServerAddresses that yields the specified addresses in a shuffled order. |
static DnsServerAddresses |
shuffled(Iterable<? extends InetSocketAddress> addresses)
Returns the
DnsServerAddresses that yields the specified address in a shuffled order. |
static DnsServerAddresses |
singleton(InetSocketAddress address)
Returns the
DnsServerAddresses that yields only a single address . |
abstract DnsServerAddressStream |
stream()
Starts a new infinite stream of DNS server addresses.
|
@Deprecated public static List<InetSocketAddress> defaultAddressList()
DefaultDnsServerAddressStreamProvider.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.
@Deprecated public static DnsServerAddresses defaultAddresses()
DefaultDnsServerAddressStreamProvider.defaultAddresses()
.
Returns the DnsServerAddresses
that 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());
public static DnsServerAddresses sequential(Iterable<? extends InetSocketAddress> addresses)
DnsServerAddresses
that yields the specified addresses
sequentially. Once the
last address is yielded, it will start again from the first address.public static DnsServerAddresses sequential(InetSocketAddress... addresses)
DnsServerAddresses
that yields the specified addresses
sequentially. Once the
last address is yielded, it will start again from the first address.public static DnsServerAddresses shuffled(Iterable<? extends InetSocketAddress> addresses)
DnsServerAddresses
that yields the specified address
in a shuffled order. Once all
addresses are yielded, the addresses are shuffled again.public static DnsServerAddresses shuffled(InetSocketAddress... addresses)
DnsServerAddresses
that yields the specified addresses
in a shuffled order. Once all
addresses are yielded, the addresses are shuffled again.public static DnsServerAddresses rotational(Iterable<? extends InetSocketAddress> addresses)
DnsServerAddresses
that yields the specified addresses
in a rotational sequential
order. It is similar to sequential(Iterable)
, but each DnsServerAddressStream
starts from
a different starting point. For example, the first stream()
will start from the first address, the
second one will start from the second address, and so on.public static DnsServerAddresses rotational(InetSocketAddress... addresses)
DnsServerAddresses
that yields the specified addresses
in a rotational sequential
order. It is similar to sequential(Iterable)
, but each DnsServerAddressStream
starts from
a different starting point. For example, the first stream()
will start from the first address, the
second one will start from the second address, and so on.public static DnsServerAddresses singleton(InetSocketAddress address)
DnsServerAddresses
that yields only a single address
.public abstract DnsServerAddressStream stream()
DnsNameResolver
on every
uncached SimpleNameResolver.resolve(String)
or SimpleNameResolver.resolveAll(String)
.Copyright © 2008–2024 The Netty Project. All rights reserved.