Class ConsumedPropertyTrackingConfigurationPropertySource
- java.lang.Object
-
- org.hibernate.search.engine.cfg.spi.ConsumedPropertyTrackingConfigurationPropertySource
-
- All Implemented Interfaces:
ConfigurationPropertySource
public final class ConsumedPropertyTrackingConfigurationPropertySource extends Object implements ConfigurationPropertySource
-
-
Constructor Summary
Constructors Constructor Description ConsumedPropertyTrackingConfigurationPropertySource(ConfigurationPropertySource delegate, Consumer<String> tracker)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<?>
get(String key)
Optional<String>
resolve(String key)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.hibernate.search.engine.cfg.ConfigurationPropertySource
withFallback, withMask, withOverride, withPrefix
-
-
-
-
Constructor Detail
-
ConsumedPropertyTrackingConfigurationPropertySource
public ConsumedPropertyTrackingConfigurationPropertySource(ConfigurationPropertySource delegate, Consumer<String> tracker)
-
-
Method Detail
-
get
public Optional<?> get(String key)
- Specified by:
get
in interfaceConfigurationPropertySource
- Parameters:
key
- The key of the property to get.- Returns:
- An optional containing the value of the requested property,
or
Optional.empty()
if the property is missing.
-
resolve
public Optional<String> resolve(String key)
- Specified by:
resolve
in interfaceConfigurationPropertySource
- Parameters:
key
- The key of the property to get.- Returns:
- An optional containing the key as registered in the underlying configuration source,
with any transformation (
prefixes
,masks
) reverted. Whether the optional is empty is not related to the key having a value in the underlying configuration source; instead, the optional is empty only if the key cannot possibly be registered in the underlying configuration source, e.g. if the key is missing a mandatory prefix.
-
-