public class HealthStatusManager extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
SERVICE_NAME_ALL_SERVICES
The special "service name" that represent all services on a GRPC server.
|
| 构造器和说明 |
|---|
HealthStatusManager(TriHealthImpl healthService) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
clearStatus(String service)
Clears the health status record of a service.
|
void |
enterTerminalState()
enterTerminalState causes the health status manager to mark all services as not serving, and
prevents future updates to services.
|
Health |
getHealthService() |
void |
setStatus(String service,
HealthCheckResponse.ServingStatus status)
Updates the status of the server.
|
public HealthStatusManager(TriHealthImpl healthService)
public Health getHealthService()
public void setStatus(String service, HealthCheckResponse.ServingStatus status)
service - the name of some aspect of the server that is associated with a health status.
This name can have no relation with the gRPC services that the server is
running with. It can also be an empty String "" per the gRPC
specification.status - is one of the values HealthCheckResponse.ServingStatus#SERVING, HealthCheckResponse.ServingStatus#NOT_SERVING and HealthCheckResponse.ServingStatus#UNKNOWN.public void clearStatus(String service)
service - the name of some aspect of the server that is associated with a health status.
This name can have no relation with the gRPC services that the server is
running with. It can also be an empty String "" per the gRPC
specification.public void enterTerminalState()
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.