public final class DnsAddressEndpointGroup extends DynamicEndpointGroup
DynamicEndpointGroup which resolves targets using DNS address queries (A and AAAA).
This is useful for environments where service discovery is handled using DNS, e.g.
Kubernetes DNS-based service
discovery.| Modifier and Type | Method and Description |
|---|---|
static DnsAddressEndpointGroupBuilder |
builder(String hostname)
Returns a new
DnsAddressEndpointGroupBuilder with the specified hostname. |
protected void |
doCloseAsync(CompletableFuture<?> future)
Stops polling DNS servers for service updates.
|
static DnsAddressEndpointGroup |
of(String hostname)
Creates a
DnsAddressEndpointGroup with an unspecified port that schedules queries on a random
EventLoop from CommonPools.workerGroup(). |
static DnsAddressEndpointGroup |
of(String hostname,
int port)
Creates a
DnsAddressEndpointGroup that schedules queries on a random EventLoop from
CommonPools.workerGroup(). |
addEndpoint, close, closeAsync, endpoints, isClosed, isClosing, removeEndpoint, select, selectionStrategy, setEndpoints, whenClosed, whenReadyaddListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, initialEndpointsFuture, of, of, of, of, orElse, removeListenerpublic static DnsAddressEndpointGroup of(String hostname)
DnsAddressEndpointGroup with an unspecified port that schedules queries on a random
EventLoop from CommonPools.workerGroup().hostname - the hostname to query DNS queries forpublic static DnsAddressEndpointGroup of(String hostname, int port)
DnsAddressEndpointGroup that schedules queries on a random EventLoop from
CommonPools.workerGroup().hostname - the hostname to query DNS queries forport - the port of the Endpointspublic static DnsAddressEndpointGroupBuilder builder(String hostname)
DnsAddressEndpointGroupBuilder with the specified hostname.hostname - the hostname to query DNS queries forprotected final void doCloseAsync(CompletableFuture<?> future)
doCloseAsync in class DynamicEndpointGroupCopyright © 2020 LeanCloud. All rights reserved.