Class SettingsMapImpl

    • Constructor Detail

      • SettingsMapImpl

        public SettingsMapImpl​(@NotNull
                               File storageFile,
                               @NotNull
                               FileWatcherFactory fileWatcherFactory)
    • Method Detail

      • getValue

        public String getValue​(@NotNull
                               String key)
        Description copied from interface: SettingsMap
        Returns the value for the key, or null if there is no one. The call may require the I/O operations, so can be potentially slow.
        Specified by:
        getValue in interface SettingsMap
        Parameters:
        key - the key
        Returns:
        the value, or null
      • setValue

        public void setValue​(@NotNull
                             String key,
                             @NotNull
                             String value)
        Description copied from interface: SettingsMap
        Sets and persists the key / value entry. The call requires the I/O operations, hence can be slow.
        Specified by:
        setValue in interface SettingsMap
        Parameters:
        key - the key
        value - the value
      • remove

        public String remove​(@NotNull
                             String key)
        Description copied from interface: SettingsMap
        Removes and persists the entry associated with the key. The call requires the I/O operations, hence can be slow.
        Specified by:
        remove in interface SettingsMap
        Parameters:
        key - the key
        Returns:
        the previous value associated with the key, or null