Class DynamicEndpointGroup
- java.lang.Object
-
- com.linecorp.armeria.common.util.AbstractListenable<List<Endpoint>>
-
- com.linecorp.armeria.client.endpoint.DynamicEndpointGroup
-
- All Implemented Interfaces:
EndpointGroup
,Listenable<List<Endpoint>>
,SafeCloseable
,AutoCloseable
- Direct Known Subclasses:
DnsAddressEndpointGroup
,DnsServiceEndpointGroup
,DnsTextEndpointGroup
,HealthCheckedEndpointGroup
,PropertiesEndpointGroup
public class DynamicEndpointGroup extends AbstractListenable<List<Endpoint>> implements EndpointGroup
A dynamicEndpointGroup
. The list ofEndpoint
s can be updated dynamically.
-
-
Constructor Summary
Constructors Constructor Description DynamicEndpointGroup()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addEndpoint(Endpoint e)
void
close()
List<Endpoint>
endpoints()
Return the endpoints held by thisEndpointGroup
.CompletableFuture<List<Endpoint>>
initialEndpointsFuture()
Returns theCompletableFuture
which is completed when the initialEndpoint
s are ready.protected void
removeEndpoint(Endpoint e)
protected void
setEndpoints(Iterable<Endpoint> endpoints)
-
Methods inherited from class com.linecorp.armeria.common.util.AbstractListenable
addListener, notifyListeners, removeListener
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.linecorp.armeria.client.endpoint.EndpointGroup
addListener, awaitInitialEndpoints, awaitInitialEndpoints, orElse, removeListener
-
-
-
-
Method Detail
-
endpoints
public final List<Endpoint> endpoints()
Description copied from interface:EndpointGroup
Return the endpoints held by thisEndpointGroup
.- Specified by:
endpoints
in interfaceEndpointGroup
-
initialEndpointsFuture
public CompletableFuture<List<Endpoint>> initialEndpointsFuture()
Returns theCompletableFuture
which is completed when the initialEndpoint
s are ready.- Specified by:
initialEndpointsFuture
in interfaceEndpointGroup
-
addEndpoint
protected final void addEndpoint(Endpoint e)
-
removeEndpoint
protected final void removeEndpoint(Endpoint e)
-
close
public void close()
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceEndpointGroup
- Specified by:
close
in interfaceSafeCloseable
-
-