public final class HealthCheckedEndpointGroup extends DynamicEndpointGroup
EndpointGroup that filters out unhealthy Endpoints from an existing EndpointGroup,
by sending periodic health check requests.| Modifier and Type | Method and Description |
|---|---|
static HealthCheckedEndpointGroupBuilder |
builder(EndpointGroup delegate,
String path)
Returns a newly created
HealthCheckedEndpointGroupBuilder that builds
a HealthCheckedEndpointGroup which sends HTTP HEAD health check requests. |
protected void |
doCloseAsync(CompletableFuture<?> future)
Override this method to release the resources held by this
EndpointGroup and complete
the specified CompletableFuture. |
MeterBinder |
newMeterBinder(MeterIdPrefix idPrefix)
Returns a newly-created
MeterBinder which binds the stats about this
HealthCheckedEndpointGroup. |
MeterBinder |
newMeterBinder(String groupName)
Returns a newly-created
MeterBinder which binds the stats about this
HealthCheckedEndpointGroup with the default meter names. |
static HealthCheckedEndpointGroup |
of(EndpointGroup delegate,
String path)
Returns a newly created
HealthCheckedEndpointGroup that sends HTTP HEAD health check
requests with default options. |
String |
toString() |
addEndpoint, close, closeAsync, endpoints, isClosed, isClosing, removeEndpoint, select, selectionStrategy, setEndpoints, whenClosed, whenReadyaddListener, notifyListeners, removeListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddListener, awaitInitialEndpoints, awaitInitialEndpoints, empty, initialEndpointsFuture, of, of, of, of, orElse, removeListenerpublic static HealthCheckedEndpointGroup of(EndpointGroup delegate, String path)
HealthCheckedEndpointGroup that sends HTTP HEAD health check
requests with default options.delegate - the EndpointGroup that provides the candidate Endpointspath - the HTTP request path, e.g. "/internal/l7check"public static HealthCheckedEndpointGroupBuilder builder(EndpointGroup delegate, String path)
HealthCheckedEndpointGroupBuilder that builds
a HealthCheckedEndpointGroup which sends HTTP HEAD health check requests.delegate - the EndpointGroup that provides the candidate Endpointspath - the HTTP request path, e.g. "/internal/l7check"protected void doCloseAsync(CompletableFuture<?> future)
DynamicEndpointGroupEndpointGroup and complete
the specified CompletableFuture.doCloseAsync in class DynamicEndpointGrouppublic MeterBinder newMeterBinder(String groupName)
MeterBinder which binds the stats about this
HealthCheckedEndpointGroup with the default meter names.public MeterBinder newMeterBinder(MeterIdPrefix idPrefix)
MeterBinder which binds the stats about this
HealthCheckedEndpointGroup.Copyright © 2020 LeanCloud. All rights reserved.