当前位置: 首页>>代码示例>>Java>>正文


Java CompositeHealthIndicator.addHealthIndicator方法代码示例

本文整理汇总了Java中org.springframework.boot.actuate.health.CompositeHealthIndicator.addHealthIndicator方法的典型用法代码示例。如果您正苦于以下问题:Java CompositeHealthIndicator.addHealthIndicator方法的具体用法?Java CompositeHealthIndicator.addHealthIndicator怎么用?Java CompositeHealthIndicator.addHealthIndicator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.springframework.boot.actuate.health.CompositeHealthIndicator的用法示例。


在下文中一共展示了CompositeHealthIndicator.addHealthIndicator方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: internalInvokeHealthIndicators

import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
private Health internalInvokeHealthIndicators() {
    CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(
            healthAggregator);
    for (Map.Entry<String, T> h : collectIndicators().entrySet()) {
        healthIndicator.addHealthIndicator(getKey(h.getKey()), h.getValue());
    }
    return healthIndicator.health();
}
 
开发者ID:dm-drogeriemarkt,项目名称:extended-actuator-health-endpoints,代码行数:9,代码来源:ExtendedHealthEndpoint.java

示例2: HealthService

import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
public HealthService(HealthAggregator healthAggregator, Map<String, org.springframework.boot.actuate.health.HealthIndicator> healthIndicators) {
    Assert.notNull(healthAggregator, "HealthAggregator must not be null");
    Assert.notNull(healthIndicators, "HealthIndicators must not be null");
    CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(
        healthAggregator);
    for (Map.Entry<String, org.springframework.boot.actuate.health.HealthIndicator> entry : healthIndicators.entrySet()) {
        healthIndicator.addHealthIndicator(getKey(entry.getKey()), entry.getValue());
    }
    this.healthIndicators = healthIndicators;
    this.healthIndicator = healthIndicator;
}
 
开发者ID:cbornet,项目名称:generator-jhipster-grpc,代码行数:12,代码来源:_HealthService.java

示例3: createHealthIndicator

import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
protected HealthIndicator createHealthIndicator(Map<String, S> beans) {
	if (beans.size() == 1) {
		return createHealthIndicator(beans.values().iterator().next());
	}
	CompositeHealthIndicator composite = new CompositeHealthIndicator(
			this.healthAggregator);
	for (Map.Entry<String, S> entry : beans.entrySet()) {
		composite.addHealthIndicator(entry.getKey(),
				createHealthIndicator(entry.getValue()));
	}
	return composite;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:13,代码来源:CompositeHealthIndicatorConfiguration.java

示例4: HealthEndpoint

import org.springframework.boot.actuate.health.CompositeHealthIndicator; //导入方法依赖的package包/类
/**
 * Create a new {@link HealthIndicator} instance.
 * @param healthAggregator the health aggregator
 * @param healthIndicators the health indicators
 */
public HealthEndpoint(HealthAggregator healthAggregator,
		Map<String, HealthIndicator> healthIndicators) {
	super("health", false);
	Assert.notNull(healthAggregator, "HealthAggregator must not be null");
	Assert.notNull(healthIndicators, "HealthIndicators must not be null");
	CompositeHealthIndicator healthIndicator = new CompositeHealthIndicator(
			healthAggregator);
	for (Map.Entry<String, HealthIndicator> entry : healthIndicators.entrySet()) {
		healthIndicator.addHealthIndicator(getKey(entry.getKey()), entry.getValue());
	}
	this.healthIndicator = healthIndicator;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:18,代码来源:HealthEndpoint.java


注:本文中的org.springframework.boot.actuate.health.CompositeHealthIndicator.addHealthIndicator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。