public final class DnsAddressEndpointGroupBuilder extends Object
DnsAddressEndpointGroup that sources its Endpoint list from the A or
AAAA DNS records of a certain hostname.| Constructor and Description |
|---|
DnsAddressEndpointGroupBuilder(String hostname)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
B |
backoff(Backoff backoff)
Sets the
Backoff that determines how much delay should be inserted between queries when a DNS
server sent an error response. |
DnsAddressEndpointGroup |
build()
Returns a newly created
DnsAddressEndpointGroup. |
B |
eventLoop(io.netty.channel.EventLoop eventLoop)
Sets the
EventLoop to use for sending DNS queries. |
DnsAddressEndpointGroupBuilder |
port(int port)
Sets the port number of the
Endpoints created by DnsAddressEndpointGroup. |
B |
serverAddresses(InetSocketAddress... serverAddresses)
Sets the DNS server addresses to send queries to.
|
B |
serverAddresses(Iterable<InetSocketAddress> serverAddresses)
Sets the DNS server addresses to send queries to.
|
B |
ttl(int minTtl,
int maxTtl)
Sets the minimum and maximum TTL of the DNS records (in seconds).
|
@Deprecated public DnsAddressEndpointGroupBuilder(String hostname)
DnsAddressEndpointGroup.builder(String).DnsAddressEndpointGroup for the specified hostname.hostname - the hostname to query DNS queries forpublic DnsAddressEndpointGroupBuilder port(int port)
Endpoints created by DnsAddressEndpointGroup.
By default, the port number of the Endpoints will remain unspecified and the protocol-dependent
default port number will be chosen automatically, e.g. 80 or 443.public DnsAddressEndpointGroup build()
DnsAddressEndpointGroup.public final B eventLoop(io.netty.channel.EventLoop eventLoop)
EventLoop to use for sending DNS queries.public final B ttl(int minTtl,
int maxTtl)
minTtl or maxTtl will be used respectively. The default
minTtl and maxTtl are 1 and Integer.MAX_VALUE, which practically tells
to respect the server TTL.public final B serverAddresses(InetSocketAddress... serverAddresses)
public final B serverAddresses(Iterable<InetSocketAddress> serverAddresses)
Copyright © 2020 LeanCloud. All rights reserved.