org.zodiac.actuate.health.AppCompositeHealthContributor Maven / Gradle / Ivy
package org.zodiac.actuate.health;
import java.util.Map;
import java.util.function.Function;
public interface AppCompositeHealthContributor
extends AppHealthContributor, AppNamedContributors {
/**
* Factory method that will create a {@link AppCompositeHealthContributor} from the specified map.
*
* @param map the source map
* @return a composite health contributor instance
*/
static AppCompositeHealthContributor fromMap(Map map) {
return fromMap(map, Function.identity());
}
/**
* Factory method that will create a {@link AppCompositeHealthContributor} from the specified map.
*
* @param the value type
* @param map the source map
* @param valueAdapter function used to adapt the map value
* @return a composite health contributor instance
*/
static AppCompositeHealthContributor fromMap(Map map,
Function valueAdapter) {
return new AppCompositeHealthContributorMapAdapter<>(map, valueAdapter);
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy