public final class DnsTextEndpointGroupBuilder extends Object
DnsTextEndpointGroup that sources its Endpoint list from the TXT
DNS records of a certain hostname.| Constructor and Description |
|---|
DnsTextEndpointGroupBuilder(String hostname,
Function<byte[],Endpoint> mapping)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
DnsTextEndpointGroupBuilder |
backoff(Backoff backoff)
Sets the
Backoff that determines how much delay should be inserted between queries when a DNS
server sent an error response. |
DnsTextEndpointGroup |
build()
Returns a newly created
DnsTextEndpointGroup. |
DnsTextEndpointGroupBuilder |
eventLoop(io.netty.channel.EventLoop eventLoop)
Sets the
EventLoop to use for sending DNS queries. |
DnsTextEndpointGroupBuilder |
selectionStrategy(EndpointSelectionStrategy selectionStrategy)
Sets the
EndpointSelectionStrategy that deteremines the enumeration order of Endpoints. |
DnsTextEndpointGroupBuilder |
serverAddresses(InetSocketAddress... serverAddresses)
Sets the DNS server addresses to send queries to.
|
DnsTextEndpointGroupBuilder |
serverAddresses(Iterable<InetSocketAddress> serverAddresses)
Sets the DNS server addresses to send queries to.
|
DnsTextEndpointGroupBuilder |
ttl(int minTtl,
int maxTtl)
Sets the minimum and maximum TTL of the DNS records (in seconds).
|
@Deprecated public DnsTextEndpointGroupBuilder(String hostname, Function<byte[],Endpoint> mapping)
DnsTextEndpointGroup.builder(String, Function).DnsTextEndpointGroup for the specified hostname.public DnsTextEndpointGroup build()
DnsTextEndpointGroup.public DnsTextEndpointGroupBuilder eventLoop(io.netty.channel.EventLoop eventLoop)
EventLoop to use for sending DNS queries.public DnsTextEndpointGroupBuilder 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 DnsTextEndpointGroupBuilder serverAddresses(InetSocketAddress... serverAddresses)
public DnsTextEndpointGroupBuilder serverAddresses(Iterable<InetSocketAddress> serverAddresses)
public DnsTextEndpointGroupBuilder 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 DnsTextEndpointGroupBuilder selectionStrategy(EndpointSelectionStrategy selectionStrategy)
EndpointSelectionStrategy that deteremines the enumeration order of Endpoints.Copyright © 2020 LeanCloud. All rights reserved.