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