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