类 CompositeReactiveHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.CompositeReactiveHealthIndicator
- 所有已实现的接口:
ReactiveHealthIndicator
public class CompositeReactiveHealthIndicator extends Object implements ReactiveHealthIndicator
ReactiveHealthIndicator
that returns health indications from all registered delegates. Provides an alternativeHealth
for a delegate that reaches a configurable timeout.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 CompositeReactiveHealthIndicator(HealthAggregator healthAggregator)
已过时。since 2.1.0 in favor ofCompositeReactiveHealthIndicator(HealthAggregator, ReactiveHealthIndicatorRegistry)
CompositeReactiveHealthIndicator(HealthAggregator healthAggregator, Map<String,ReactiveHealthIndicator> indicators)
已过时。since 2.1.0 in favor ofCompositeReactiveHealthIndicator(HealthAggregator, ReactiveHealthIndicatorRegistry)
CompositeReactiveHealthIndicator(HealthAggregator healthAggregator, ReactiveHealthIndicatorRegistry registry)
Create a newCompositeReactiveHealthIndicator
from the indicators in the givenregistry
.
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 CompositeReactiveHealthIndicator
addHealthIndicator(String name, ReactiveHealthIndicator indicator)
已过时。since 2.1.0 in favor ofReactiveHealthIndicatorRegistry.register(String, ReactiveHealthIndicator)
reactor.core.publisher.Mono<Health>
health()
Provide the indicator of health.CompositeReactiveHealthIndicator
timeoutStrategy(long timeout, Health timeoutHealth)
构造器详细资料
CompositeReactiveHealthIndicator
@Deprecated public CompositeReactiveHealthIndicator(HealthAggregator healthAggregator)
已过时。since 2.1.0 in favor ofCompositeReactiveHealthIndicator(HealthAggregator, ReactiveHealthIndicatorRegistry)
Create a newCompositeReactiveHealthIndicator
.- 参数:
healthAggregator
- the health aggregator
CompositeReactiveHealthIndicator
@Deprecated public CompositeReactiveHealthIndicator(HealthAggregator healthAggregator, Map<String,ReactiveHealthIndicator> indicators)
已过时。since 2.1.0 in favor ofCompositeReactiveHealthIndicator(HealthAggregator, ReactiveHealthIndicatorRegistry)
Create a newCompositeReactiveHealthIndicator
from the specified indicators.- 参数:
healthAggregator
- the health aggregatorindicators
- a map ofHealthIndicators
with the key being used as an indicator name.
CompositeReactiveHealthIndicator
public CompositeReactiveHealthIndicator(HealthAggregator healthAggregator, ReactiveHealthIndicatorRegistry registry)
Create a newCompositeReactiveHealthIndicator
from the indicators in the givenregistry
.- 参数:
healthAggregator
- the health aggregatorregistry
- the registry ofHealthIndicators
.
方法详细资料
addHealthIndicator
@Deprecated public CompositeReactiveHealthIndicator addHealthIndicator(String name, ReactiveHealthIndicator indicator)
已过时。since 2.1.0 in favor ofReactiveHealthIndicatorRegistry.register(String, ReactiveHealthIndicator)
Add aReactiveHealthIndicator
with the specified name.- 参数:
name
- the name of the health indicatorindicator
- the health indicator to add- 返回:
- this instance
- 抛出:
IllegalStateException
- if an indicator with the givenname
is already registered.
timeoutStrategy
public CompositeReactiveHealthIndicator timeoutStrategy(long timeout, Health timeoutHealth)
- 参数:
timeout
- number of milliseconds to wait before using thetimeoutHealth
timeoutHealth
- theHealth
to use if an health indicator reached thetimeout
- 返回:
- this instance
health
public reactor.core.publisher.Mono<Health> health()
从接口复制的说明:ReactiveHealthIndicator
Provide the indicator of health.- 指定者:
health
在接口中ReactiveHealthIndicator
- 返回:
- a
Mono
that provides theHealth