Class PropertyUtil
java.lang.Object
io.camunda.zeebe.spring.client.configuration.PropertyUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TgetOrLegacyOrDefault(String propertyName, Supplier<T> propertySupplier, Supplier<T> legacyPropertySupplier, T defaultProperty, Map<String, Object> configCache) Returns the property in the given relevance: legacyProperty, property,defaultPropertystatic <T> Supplier<T> prioritized(T defaultProperty, List<Supplier<T>> suppliers)
-
Constructor Details
-
PropertyUtil
public PropertyUtil()
-
-
Method Details
-
getOrLegacyOrDefault
public static <T> T getOrLegacyOrDefault(String propertyName, Supplier<T> propertySupplier, Supplier<T> legacyPropertySupplier, T defaultProperty, Map<String, Object> configCache) Returns the property in the given relevance: legacyProperty, property,defaultProperty- Type Parameters:
T- the type of the property- Parameters:
propertyName- the name of the property, used for loggingpropertySupplier- a function to supply the property, may throwlegacyPropertySupplier- a function to supply the legacy property, may throwdefaultProperty- the default to apply if nothing else suits, may be nullconfigCache- the cache to save the property to, may be null- Returns:
- the property resolved
-
prioritized
-