Interface ConfigProvider

All Known Implementing Classes:
AggregatePriorityListConfigProvider, EnvVarConfigProvider, PropertiesConfigProvider, YamlConfigProvider

public interface ConfigProvider
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> Optional<T>
    getValue(String key, Class<T> type)
    Returns the value associated with key, converted to type, or an empty Optional if the key is not set.
  • Method Details

    • getValue

      <T> Optional<T> getValue(String key, Class<T> type)
      Returns the value associated with key, converted to type, or an empty Optional if the key is not set.
      Type Parameters:
      T - the value type
      Parameters:
      key - the dot-separated configuration key, e.g. josdk.cache.sync.timeout
      type - the expected type of the value; supported types depend on the implementation
      Returns:
      an Optional containing the typed value, or empty if the key is absent
      Throws:
      IllegalArgumentException - if type is not supported by the implementation