Class MeterRegistryConfigValidator
java.lang.Object
io.micrometer.core.instrument.config.MeterRegistryConfigValidator
- Since:
- 1.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <M extends @NonNull MeterRegistryConfig,T>
Function<M, Validated<T>> 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<?> static <M extends @NonNull MeterRegistryConfig,T>
Function<M, Validated<T>> checkRequired(@NonNull 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
@NullUnmarked public static <M extends @NonNull MeterRegistryConfig,T> Function<M,Validated<T>> check(@NonNull String property, 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
@NullUnmarked public static <M extends @NonNull MeterRegistryConfig,T> Function<M,Validated<T>> checkRequired(@NonNull String property, Function<M, T> getter)
-