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 |
|---|---|
DnsAddressEndpointGroupBuilder |
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. |
DnsAddressEndpointGroupBuilder |
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. |
DnsAddressEndpointGroupBuilder |
selectionStrategy(EndpointSelectionStrategy selectionStrategy)
Sets the
EndpointSelectionStrategy that deteremines the enumeration order of Endpoints. |
DnsAddressEndpointGroupBuilder |
serverAddresses(InetSocketAddress... serverAddresses)
Sets the DNS server addresses to send queries to.
|
DnsAddressEndpointGroupBuilder |
serverAddresses(Iterable<InetSocketAddress> serverAddresses)
Sets the DNS server addresses to send queries to.
|
DnsAddressEndpointGroupBuilder |
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 DnsAddressEndpointGroupBuilder eventLoop(io.netty.channel.EventLoop eventLoop)
EventLoop to use for sending DNS queries.public DnsAddressEndpointGroupBuilder 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 DnsAddressEndpointGroupBuilder serverAddresses(InetSocketAddress... serverAddresses)
public DnsAddressEndpointGroupBuilder serverAddresses(Iterable<InetSocketAddress> serverAddresses)
public DnsAddressEndpointGroupBuilder backoff(Backoff backoff)
Backoff that determines how much delay should be inserted between queries when a DNS
server sent an error response. Backoff.exponential(1000, 32000).withJitter(0.2) is used by
default.public DnsAddressEndpointGroupBuilder selectionStrategy(EndpointSelectionStrategy selectionStrategy)
EndpointSelectionStrategy that deteremines the enumeration order of Endpoints.Copyright © 2020 LeanCloud. All rights reserved.