public final class DnsTextEndpointGroup extends DynamicEndpointGroup
DynamicEndpointGroup which resolves targets using DNS TXT records. This is useful for
environments where service discovery is handled using DNS.| Modifier and Type | Method and Description |
|---|---|
static DnsTextEndpointGroupBuilder |
builder(String hostname,
Function<byte[],Endpoint> mapping)
Returns a new
DnsTextEndpointGroupBuilder with
the specified hostname and Function mapping. |
protected void |
doCloseAsync(CompletableFuture<?> future)
Stops polling DNS servers for service updates.
|
static DnsTextEndpointGroup |
of(String hostname,
Function<byte[],Endpoint> mapping)
Creates a
DnsTextEndpointGroup 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 DnsTextEndpointGroup of(String hostname, Function<byte[],Endpoint> mapping)
DnsTextEndpointGroup that schedules queries on a random EventLoop from
CommonPools.workerGroup().public static DnsTextEndpointGroupBuilder builder(String hostname, Function<byte[],Endpoint> mapping)
DnsTextEndpointGroupBuilder with
the specified hostname and Function mapping.protected final void doCloseAsync(CompletableFuture<?> future)
doCloseAsync in class DynamicEndpointGroupCopyright © 2020 LeanCloud. All rights reserved.