Class PropertyUtil

java.lang.Object
io.camunda.zeebe.spring.client.configuration.PropertyUtil

public class PropertyUtil extends Object
  • 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 logging
      propertySupplier - a function to supply the property, may throw
      legacyPropertySupplier - a function to supply the legacy property, may throw
      defaultProperty - the default to apply if nothing else suits, may be null
      configCache - the cache to save the property to, may be null
      Returns:
      the property resolved
    • prioritized

      public static <T> Supplier<T> prioritized(T defaultProperty, List<Supplier<T>> suppliers)