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. |
void |
close()
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, endpoints, initialEndpointsFuture, removeEndpoint, setEndpointsaddListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, 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.public final void close()
close in interface EndpointGroupclose in interface SafeCloseableclose in interface AutoCloseableclose in class DynamicEndpointGroupCopyright © 2020 LeanCloud. All rights reserved.