public class DefaultReactiveHealthIndicatorRegistry extends Object implements ReactiveHealthIndicatorRegistry
ReactiveHealthIndicatorRegistry
.Constructor and Description |
---|
DefaultReactiveHealthIndicatorRegistry()
Create a new
DefaultReactiveHealthIndicatorRegistry . |
DefaultReactiveHealthIndicatorRegistry(Map<String,ReactiveHealthIndicator> healthIndicators)
Create a new
DefaultReactiveHealthIndicatorRegistry from the specified
indicators. |
Modifier and Type | Method and Description |
---|---|
ReactiveHealthIndicator |
get(String name)
Returns the
ReactiveHealthIndicator registered with the given name . |
Map<String,ReactiveHealthIndicator> |
getAll()
Returns a snapshot of the registered health indicators and their names.
|
void |
register(String name,
ReactiveHealthIndicator healthIndicator)
Registers the given
ReactiveHealthIndicator , associating it with the given
name . |
ReactiveHealthIndicator |
unregister(String name)
Unregisters the
ReactiveHealthIndicator previously registered with the
given name . |
public DefaultReactiveHealthIndicatorRegistry()
DefaultReactiveHealthIndicatorRegistry
.public DefaultReactiveHealthIndicatorRegistry(Map<String,ReactiveHealthIndicator> healthIndicators)
DefaultReactiveHealthIndicatorRegistry
from the specified
indicators.healthIndicators
- a map of HealthIndicator
s with the key being used
as an indicator name.public void register(String name, ReactiveHealthIndicator healthIndicator)
ReactiveHealthIndicatorRegistry
ReactiveHealthIndicator
, associating it with the given
name
.register
in interface ReactiveHealthIndicatorRegistry
name
- the name of the indicatorhealthIndicator
- the indicatorpublic ReactiveHealthIndicator unregister(String name)
ReactiveHealthIndicatorRegistry
ReactiveHealthIndicator
previously registered with the
given name
.unregister
in interface ReactiveHealthIndicatorRegistry
name
- the name of the indicatornull
if no indicator was found in
the registry for the given name
.public ReactiveHealthIndicator get(String name)
ReactiveHealthIndicatorRegistry
ReactiveHealthIndicator
registered with the given name
.get
in interface ReactiveHealthIndicatorRegistry
name
- the name of the indicatornull
if no indicator was registered with
the given name
.public Map<String,ReactiveHealthIndicator> getAll()
ReactiveHealthIndicatorRegistry
getAll
in interface ReactiveHealthIndicatorRegistry
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.