org.springframework.boot.actuate.health.StatusAggregator Java Examples

The following examples show how to use org.springframework.boot.actuate.health.StatusAggregator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CircuitBreakersHealthIndicatorAutoConfiguration.java    From resilience4j with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean(name = "circuitBreakersHealthIndicator")
@ConditionalOnProperty(prefix = "management.health.circuitbreakers", name = "enabled")
public CircuitBreakersHealthIndicator circuitBreakersHealthIndicator(
    CircuitBreakerRegistry circuitBreakerRegistry,
    CircuitBreakerConfigurationProperties circuitBreakerProperties,
    StatusAggregator statusAggregator) {
    return new CircuitBreakersHealthIndicator(circuitBreakerRegistry, circuitBreakerProperties, statusAggregator);
}
 
Example #2
Source File: RateLimitersHealthIndicatorAutoConfiguration.java    From resilience4j with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean(name = "rateLimitersHealthIndicator")
@ConditionalOnProperty(prefix = "management.health.ratelimiters", name = "enabled")
public RateLimitersHealthIndicator rateLimitersHealthIndicator(
    RateLimiterRegistry rateLimiterRegistry,
    RateLimiterConfigurationProperties rateLimiterProperties,
    StatusAggregator statusAggregator) {
    return new RateLimitersHealthIndicator(rateLimiterRegistry, rateLimiterProperties, statusAggregator);
}
 
Example #3
Source File: EurekaHealthCheckHandler.java    From spring-cloud-netflix with Apache License 2.0 5 votes vote down vote up
protected Status getStatus(StatusAggregator statusAggregator) {
	Status status;
	Set<Status> statusSet = healthIndicators.values().stream()
			.map(HealthIndicator::health).map(Health::getStatus)
			.collect(Collectors.toSet());
	status = statusAggregator.getAggregateStatus(statusSet);
	return status;
}
 
Example #4
Source File: EurekaHealthCheckHandler.java    From spring-cloud-netflix with Apache License 2.0 4 votes vote down vote up
public EurekaHealthCheckHandler(StatusAggregator statusAggregator) {
	this.statusAggregator = statusAggregator;
	Assert.notNull(statusAggregator, "StatusAggregator must not be null");

}