public class DynamicEndpointGroup extends AbstractListenable<List<Endpoint>> implements EndpointGroup
EndpointGroup. The list of Endpoints can be updated dynamically.| Constructor and Description |
|---|
DynamicEndpointGroup() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addEndpoint(Endpoint e)
|
void |
close() |
List<Endpoint> |
endpoints()
Return the endpoints held by this
EndpointGroup. |
CompletableFuture<List<Endpoint>> |
initialEndpointsFuture()
Returns the
CompletableFuture which is completed when the initial Endpoints are ready. |
protected void |
removeEndpoint(Endpoint e)
|
protected void |
setEndpoints(Iterable<Endpoint> endpoints)
|
addListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, of, of, orElse, removeListenerpublic final List<Endpoint> endpoints()
EndpointGroupEndpointGroup.endpoints in interface EndpointGrouppublic CompletableFuture<List<Endpoint>> initialEndpointsFuture()
CompletableFuture which is completed when the initial Endpoints are ready.initialEndpointsFuture in interface EndpointGroupprotected final void addEndpoint(Endpoint e)
protected final void removeEndpoint(Endpoint e)
public void close()
close in interface EndpointGroupclose in interface SafeCloseableclose in interface AutoCloseableCopyright © 2020 LeanCloud. All rights reserved.