Class MeterRegistryConfigValidator
java.lang.Object
io.micrometer.core.instrument.config.MeterRegistryConfigValidator
public class MeterRegistryConfigValidator
extends java.lang.Object
- Since:
- 1.5.0
-
Method Summary
Modifier and Type Method Description static <M extends MeterRegistryConfig, T>
java.util.function.Function<M,Validated<T>>check(java.lang.String property, java.util.function.Function<M,T> getter)Specifies how to retrieve a property on a configuration object, which in turn may usePropertyValidatorto validate the format of the source of the property's value based on the configuration'sMeterRegistryConfig.get(String)implementation.static <M extends MeterRegistryConfig>
Validated<?>checkAll(M config, java.util.function.Function<M,? extends Validated<?>>... validation)static <M extends MeterRegistryConfig, T>
java.util.function.Function<M,Validated<T>>checkRequired(java.lang.String property, java.util.function.Function<M,T> getter)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
checkAll
@SafeVarargs public static <M extends MeterRegistryConfig> Validated<?> checkAll(M config, java.util.function.Function<M,? extends Validated<?>>... validation) -
check
public static <M extends MeterRegistryConfig, T> java.util.function.Function<M,Validated<T>> check(java.lang.String property, java.util.function.Function<M,T> getter)Specifies how to retrieve a property on a configuration object, which in turn may usePropertyValidatorto validate the format of the source of the property's value based on the configuration'sMeterRegistryConfig.get(String)implementation. Alternatively the getter method used to fetch the property may be overridden directly by a programmer as they instantiate the configuration interface.- Type Parameters:
M- The type of the configuration interface.T- The type of the property.- Parameters:
property- The named property to retrieve.getter- The method on the configuration interface which corresponds to this property.- Returns:
- A function which, given a configuration instance, validates the property.
-
checkRequired
public static <M extends MeterRegistryConfig, T> java.util.function.Function<M,Validated<T>> checkRequired(java.lang.String property, java.util.function.Function<M,T> getter)
-