@PublicEvolving public interface ReadableConfig
ConfigOption
.Modifier and Type | Method and Description |
---|---|
<T> T |
get(ConfigOption<T> option)
Reads a value using the metada included in
ConfigOption . |
<T> Optional<T> |
getOptional(ConfigOption<T> option)
Reads a value using the metada included in
ConfigOption . |
<T> T get(ConfigOption<T> option)
ConfigOption
. Returns the
ConfigOption.defaultValue()
if value key not present in the configuration.T
- type of the value to readoption
- metadata of the option to readConfigOption.defaultValue()
if not foundgetOptional(ConfigOption)
<T> Optional<T> getOptional(ConfigOption<T> option)
ConfigOption
. In contrast to
get(ConfigOption)
returns Optional.empty()
if value not present.T
- type of the value to readoption
- metadata of the option to readOptional.empty()
if not foundget(ConfigOption)
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.