类 DefaultReactiveHealthIndicatorRegistry
- java.lang.Object
- org.springframework.boot.actuate.health.DefaultReactiveHealthIndicatorRegistry
- 所有已实现的接口:
ReactiveHealthIndicatorRegistry
public class DefaultReactiveHealthIndicatorRegistry extends Object implements ReactiveHealthIndicatorRegistry
Default implementation ofReactiveHealthIndicatorRegistry
.- 从以下版本开始:
- 2.1.0
构造器概要
构造器 构造器 说明 DefaultReactiveHealthIndicatorRegistry()
Create a newDefaultReactiveHealthIndicatorRegistry
.DefaultReactiveHealthIndicatorRegistry(Map<String,ReactiveHealthIndicator> healthIndicators)
Create a newDefaultReactiveHealthIndicatorRegistry
from the specified indicators.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ReactiveHealthIndicator
get(String name)
Returns theReactiveHealthIndicator
registered with the givenname
.Map<String,ReactiveHealthIndicator>
getAll()
Returns a snapshot of the registered health indicators and their names.void
register(String name, ReactiveHealthIndicator healthIndicator)
Registers the givenReactiveHealthIndicator
, associating it with the givenname
.ReactiveHealthIndicator
unregister(String name)
Unregisters theReactiveHealthIndicator
previously registered with the givenname
.
构造器详细资料
DefaultReactiveHealthIndicatorRegistry
public DefaultReactiveHealthIndicatorRegistry()
Create a newDefaultReactiveHealthIndicatorRegistry
.
DefaultReactiveHealthIndicatorRegistry
public DefaultReactiveHealthIndicatorRegistry(Map<String,ReactiveHealthIndicator> healthIndicators)
Create a newDefaultReactiveHealthIndicatorRegistry
from the specified indicators.- 参数:
healthIndicators
- a map ofHealthIndicator
s with the key being used as an indicator name.
方法详细资料
register
public void register(String name, ReactiveHealthIndicator healthIndicator)
从接口复制的说明:ReactiveHealthIndicatorRegistry
Registers the givenReactiveHealthIndicator
, associating it with the givenname
.- 指定者:
register
在接口中ReactiveHealthIndicatorRegistry
- 参数:
name
- the name of the indicatorhealthIndicator
- the indicator
unregister
public ReactiveHealthIndicator unregister(String name)
从接口复制的说明:ReactiveHealthIndicatorRegistry
Unregisters theReactiveHealthIndicator
previously registered with the givenname
.- 指定者:
unregister
在接口中ReactiveHealthIndicatorRegistry
- 参数:
name
- the name of the indicator- 返回:
- the unregistered indicator, or
null
if no indicator was found in the registry for the givenname
.
get
public ReactiveHealthIndicator get(String name)
从接口复制的说明:ReactiveHealthIndicatorRegistry
Returns theReactiveHealthIndicator
registered with the givenname
.- 指定者:
get
在接口中ReactiveHealthIndicatorRegistry
- 参数:
name
- the name of the indicator- 返回:
- the health indicator, or
null
if no indicator was registered with the givenname
.
getAll
public Map<String,ReactiveHealthIndicator> getAll()
从接口复制的说明:ReactiveHealthIndicatorRegistry
Returns a snapshot of the registered health indicators and their names. The contents of the map do not reflect subsequent changes to the registry.- 指定者:
getAll
在接口中ReactiveHealthIndicatorRegistry
- 返回:
- the snapshot of registered health indicators