Interface ReactiveHealthIndicatorRegistry
- All Known Implementing Classes:
DefaultReactiveHealthIndicatorRegistry
public interface ReactiveHealthIndicatorRegistry
A registry ofReactiveHealthIndicators
.Implementations must be thread-safe.
- Since:
- 2.1.0
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
.
Method Detail
register
void register(String name, ReactiveHealthIndicator healthIndicator)
Registers the givenReactiveHealthIndicator
, associating it with the givenname
.- Parameters:
name
- the name of the indicatorhealthIndicator
- the indicator- Throws:
IllegalStateException
- if an indicator with the givenname
is already registered.
unregister
ReactiveHealthIndicator unregister(String name)
Unregisters theReactiveHealthIndicator
previously registered with the givenname
.- Parameters:
name
- the name of the indicator- Returns:
- the unregistered indicator, or
null
if no indicator was found in the registry for the givenname
.
get
ReactiveHealthIndicator get(String name)
Returns theReactiveHealthIndicator
registered with the givenname
.- Parameters:
name
- the name of the indicator- Returns:
- the health indicator, or
null
if no indicator was registered with the givenname
.
getAll
Map<String,ReactiveHealthIndicator> getAll()
Returns a snapshot of the registered health indicators and their names. The contents of the map do not reflect subsequent changes to the registry.- Returns:
- the snapshot of registered health indicators