/** * Constructor. * * @param configSource DimensionConfigs to load the dimensions. */ public TypeAwareDimensionLoader(Iterable<DimensionConfig> configSource) { this.configSource = configSource; healthCheckRegistry = HealthCheckRegistryFactory.getRegistry(); }
@Override protected HealthCheckRegistry getHealthCheckRegistry() { return HealthCheckRegistryFactory.getRegistry(); } }
/** * Get all the failing healthchecks. * * @return A map of all the health checks that are unhealthy */ public Map<String, Result> getUnhealthy() { return HealthCheckRegistryFactory.getRegistry().runHealthChecks().entrySet().stream() .filter(entry -> !entry.getValue().isHealthy()) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); }
@Override protected void configure() { HealthCheckRegistry healthCheckRegistry = HealthCheckRegistryFactory.getRegistry();