Interface PropertySource


  • public interface PropertySource
    Manages a source of property-like values.
    • Method Detail

      • reloadIfUpdated

        void reloadIfUpdated()
        Reloads the properties from the source if they have been changed since the last load.
      • getKeysStartingWith

        Set<String> getKeysStartingWith​(String prefix)
        Returns the keys from the source that start with the specified prefix.
        Parameters:
        prefix - the prefix to find
        Returns:
        the keys starting with the specified prefix; an empty collection if no keys are found
      • getValue

        String getValue​(String key,
                        String defaultValue)
        Returns the value of the specified key. If the key is not found the specified default value is returned.
        Parameters:
        key - the key
        defaultValue - the default value if the key is not found
        Returns:
        the value for the key
      • getEditor

        PropertySource.Editor getEditor()
        Returns a class suitable for editing the properties in the underlying representation in a thread-safe manner.
        Returns:
        an editor instance
        Throws:
        UnsupportedOperationException - if this property source does not support updates