类 ElasticsearchHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.AbstractHealthIndicator
- org.springframework.boot.actuate.elasticsearch.ElasticsearchHealthIndicator
- 所有已实现的接口:
HealthIndicator
public class ElasticsearchHealthIndicator extends AbstractHealthIndicator
HealthIndicator
for an Elasticsearch cluster.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 ElasticsearchHealthIndicator(org.elasticsearch.client.Client client, long responseTimeout, String... indices)
Create a newElasticsearchHealthIndicator
instance.ElasticsearchHealthIndicator(org.elasticsearch.client.Client client, long responseTimeout, List<String> indices)
Create a newElasticsearchHealthIndicator
instance.
构造器详细资料
ElasticsearchHealthIndicator
public ElasticsearchHealthIndicator(org.elasticsearch.client.Client client, long responseTimeout, List<String> indices)
Create a newElasticsearchHealthIndicator
instance.- 参数:
client
- the Elasticsearch clientresponseTimeout
- the request timeout in millisecondsindices
- the indices to check
ElasticsearchHealthIndicator
public ElasticsearchHealthIndicator(org.elasticsearch.client.Client client, long responseTimeout, String... indices)
Create a newElasticsearchHealthIndicator
instance.- 参数:
client
- the Elasticsearch clientresponseTimeout
- the request timeout in millisecondsindices
- the indices to check
方法详细资料
doHealthCheck
protected void doHealthCheck(Health.Builder builder) throws Exception
从类复制的说明:AbstractHealthIndicator
Actual health check logic.- 指定者:
doHealthCheck
在类中AbstractHealthIndicator
- 参数:
builder
- theHealth.Builder
to report health status and details- 抛出:
Exception
- anyException
that should create aStatus.DOWN
system status.