Class MeterRegistryConfigValidator
java.lang.Object
io.micrometer.core.instrument.config.MeterRegistryConfigValidator
- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <M extends MeterRegistryConfig,
T>
Function<M, Validated<T>> Specifies how to retrieve a property on a configuration object, which in turn may usePropertyValidator
to validate the format of the source of the property's value based on the configuration'sMeterRegistryConfig.get(String)
implementation.static <M extends MeterRegistryConfig>
Validated<?> static <M extends MeterRegistryConfig,
T>
Function<M, Validated<T>> checkRequired
(String property, Function<M, T> getter)
-
Method Details
-
checkAll
@SafeVarargs public static <M extends MeterRegistryConfig> Validated<?> checkAll(M config, Function<M, ? extends Validated<?>>... validation) -
check
public static <M extends MeterRegistryConfig,T> Function<M,Validated<T>> check(String property, Function<M, T> getter) Specifies how to retrieve a property on a configuration object, which in turn may usePropertyValidator
to 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> Function<M,Validated<T>> checkRequired(String property, Function<M, T> getter)
-