public class CompositeHealthIndicator extends Object implements HealthIndicator
HealthIndicator that returns health indications from all registered delegates.| Constructor and Description |
|---|
CompositeHealthIndicator(HealthAggregator healthAggregator)
Deprecated.
since 2.1.0 in favor of
CompositeHealthIndicator(HealthAggregator, HealthIndicatorRegistry) |
CompositeHealthIndicator(HealthAggregator healthAggregator,
HealthIndicatorRegistry registry)
Create a new
CompositeHealthIndicator from the indicators in the given
registry. |
CompositeHealthIndicator(HealthAggregator healthAggregator,
Map<String,HealthIndicator> indicators)
Create a new
CompositeHealthIndicator from the specified indicators. |
| Modifier and Type | Method and Description |
|---|---|
void |
addHealthIndicator(String name,
HealthIndicator indicator)
Deprecated.
since 2.1.0 in favor of
HealthIndicatorRegistry.register(String, HealthIndicator) |
HealthIndicatorRegistry |
getRegistry()
Return the
HealthIndicatorRegistry of this instance. |
Health |
health()
Return an indication of health.
|
@Deprecated public CompositeHealthIndicator(HealthAggregator healthAggregator)
CompositeHealthIndicator(HealthAggregator, HealthIndicatorRegistry)CompositeHealthIndicator.healthAggregator - the health aggregatorpublic CompositeHealthIndicator(HealthAggregator healthAggregator, Map<String,HealthIndicator> indicators)
CompositeHealthIndicator from the specified indicators.healthAggregator - the health aggregatorindicators - a map of HealthIndicators with the key
being used as an indicator name.public CompositeHealthIndicator(HealthAggregator healthAggregator, HealthIndicatorRegistry registry)
CompositeHealthIndicator from the indicators in the given
registry.healthAggregator - the health aggregatorregistry - the registry of HealthIndicators.@Deprecated public void addHealthIndicator(String name, HealthIndicator indicator)
HealthIndicatorRegistry.register(String, HealthIndicator)healthIndicator, associating it with the given name.name - the name of the indicatorindicator - the indicatorIllegalStateException - if an indicator with the given name is
already registered.public HealthIndicatorRegistry getRegistry()
HealthIndicatorRegistry of this instance.health indicatorspublic Health health()
HealthIndicatorhealth in interface HealthIndicatorCopyright © 2018 Pivotal Software, Inc.. All rights reserved.