类 CompositeHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.CompositeHealthIndicator
- 所有已实现的接口:
HealthIndicator
public class CompositeHealthIndicator extends Object implements HealthIndicator
HealthIndicator
that returns health indications from all registered delegates.- 从以下版本开始:
- 1.1.0
构造器概要
构造器 构造器 说明 CompositeHealthIndicator(HealthAggregator healthAggregator)
已过时。since 2.1.0 in favor ofCompositeHealthIndicator(HealthAggregator, HealthIndicatorRegistry)
CompositeHealthIndicator(HealthAggregator healthAggregator, Map<String,HealthIndicator> indicators)
Create a newCompositeHealthIndicator
from the specified indicators.CompositeHealthIndicator(HealthAggregator healthAggregator, HealthIndicatorRegistry registry)
Create a newCompositeHealthIndicator
from the indicators in the givenregistry
.
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 void
addHealthIndicator(String name, HealthIndicator indicator)
已过时。since 2.1.0 in favor ofHealthIndicatorRegistry.register(String, HealthIndicator)
HealthIndicatorRegistry
getRegistry()
Return theHealthIndicatorRegistry
of this instance.Health
health()
Return an indication of health.
构造器详细资料
CompositeHealthIndicator
@Deprecated public CompositeHealthIndicator(HealthAggregator healthAggregator)
已过时。since 2.1.0 in favor ofCompositeHealthIndicator(HealthAggregator, HealthIndicatorRegistry)
Create a newCompositeHealthIndicator
.- 参数:
healthAggregator
- the health aggregator
CompositeHealthIndicator
public CompositeHealthIndicator(HealthAggregator healthAggregator, Map<String,HealthIndicator> indicators)
Create a newCompositeHealthIndicator
from the specified indicators.- 参数:
healthAggregator
- the health aggregatorindicators
- a map ofHealthIndicators
with the key being used as an indicator name.
CompositeHealthIndicator
public CompositeHealthIndicator(HealthAggregator healthAggregator, HealthIndicatorRegistry registry)
Create a newCompositeHealthIndicator
from the indicators in the givenregistry
.- 参数:
healthAggregator
- the health aggregatorregistry
- the registry ofHealthIndicators
.
方法详细资料
addHealthIndicator
@Deprecated public void addHealthIndicator(String name, HealthIndicator indicator)
已过时。since 2.1.0 in favor ofHealthIndicatorRegistry.register(String, HealthIndicator)
Adds the givenhealthIndicator
, associating it with the givenname
.- 参数:
name
- the name of the indicatorindicator
- the indicator- 抛出:
IllegalStateException
- if an indicator with the givenname
is already registered.
getRegistry
public HealthIndicatorRegistry getRegistry()
Return theHealthIndicatorRegistry
of this instance.- 返回:
- the registry of nested
health indicators
- 从以下版本开始:
- 2.1.0
health
public Health health()
从接口复制的说明:HealthIndicator
Return an indication of health.- 指定者:
health
在接口中HealthIndicator
- 返回:
- the health for