Top Description Constructors Methods
io.netty.resolver.dns

public Class RoundRobinDnsAddressResolverGroup

extends DnsAddressResolverGroup
Class Inheritance
Imports
io.netty.channel.ChannelFactory, .EventLoop, io.netty.channel.socket.DatagramChannel, io.netty.resolver.AddressResolver, .AddressResolverGroup, .NameResolver, .RoundRobinInetAddressResolver, java.net.InetAddress, .InetSocketAddress

A AddressResolverGroup of DnsNameResolvers that supports random selection of destination addresses if multiple are provided by the nameserver. This is ideal for use in applications that use a pool of connections, for which connecting to a single resolved address would be inefficient.

Constructor Summary

AccessConstructor and Description
public
public
public
RoundRobinDnsAddressResolverGroup(ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider)

Deprecated as a consequence of ChannelFactory being deprecated.

Method Summary

Modifier and TypeMethod and Description
protected final AddressResolver<InetSocketAddress>
Inherited from io.netty.resolver.dns.DnsAddressResolverGroup:
newNameResolvernewResolvernewResolver

Constructor Detail

RoundRobinDnsAddressResolverGroupback to summary
public RoundRobinDnsAddressResolverGroup(DnsNameResolverBuilder dnsResolverBuilder)
RoundRobinDnsAddressResolverGroupback to summary
public RoundRobinDnsAddressResolverGroup(Class<? extends DatagramChannel> channelType, DnsServerAddressStreamProvider nameServerProvider)
RoundRobinDnsAddressResolverGroupback to summary
public RoundRobinDnsAddressResolverGroup(ChannelFactory<? extends DatagramChannel> channelFactory, DnsServerAddressStreamProvider nameServerProvider)

Deprecated

as a consequence of ChannelFactory being deprecated. See corresponding docs for further information.

Method Detail

newAddressResolverback to summary
protected final AddressResolver<InetSocketAddress> newAddressResolver(EventLoop eventLoop, NameResolver<InetAddress> resolver) throws Exception

Overrides io.netty.resolver.dns.DnsAddressResolverGroup.newAddressResolver.

We need to override this method, not newNameResolver(EventLoop, ChannelFactory, DnsServerAddressStreamProvider), because we need to eliminate possible caching of io.netty.resolver.NameResolver#resolve by InflightNameResolver created in newResolver(EventLoop, ChannelFactory, DnsServerAddressStreamProvider).

Annotations
@Override