Interface ConfigurationLoader

All Known Implementing Classes:
ConfigurationLoader.InputStreamConfigurationLoader
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@Deprecated
@FunctionalInterface
public interface ConfigurationLoader
Deprecated.
replaced by generic ConfigurationLoader, will be removed in a future release
See Also:
one.microstream.storage.configuration
  • Method Details

    • loadConfiguration

      String loadConfiguration()
      Deprecated.
      Loads the configuration from the given resource.
      Returns:
      the configuration resource's content.
      Throws:
      StorageConfigurationException - if an error occurs while loading the resource
    • load

      static String load​(String path)
      Deprecated.
      Loads the configuration from the given resource.

      The load order is as follows:

      • The classpath
      • As an URL
      • As a file
      Parameters:
      path - a classpath resource, a file path or an URL
      Returns:
      the configuration resource's content.
      Throws:
      StorageConfigurationException - if an error occurs while loading the resource
    • load

      static String load​(String path, Charset charset)
      Deprecated.
      Loads the configuration from the given resource.

      The load order is as follows:

      • The classpath
      • As an URL
      • As a file
      Parameters:
      path - a classpath resource, a file path or an URL
      charset - the charset used to load the configuration
      Returns:
      the configuration resource's content.
      Throws:
      StorageConfigurationException - if an error occurs while loading the resource
    • loadFromPath

      static String loadFromPath​(Path path)
      Deprecated.
      Tries to load the configuration from path.
      Parameters:
      path - file system path
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • loadFromPath

      static String loadFromPath​(Path path, Charset charset)
      Deprecated.
      Tries to load the configuration from path.
      Parameters:
      path - file system path
      charset - the charset used to load the configuration
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • loadFromFile

      static String loadFromFile​(File file)
      Deprecated.
      Tries to load the configuration from file.
      Parameters:
      file - file path
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • loadFromFile

      static String loadFromFile​(File file, Charset charset)
      Deprecated.
      Tries to load the configuration from file.
      Parameters:
      file - file path
      charset - the charset used to load the configuration
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • loadFromUrl

      static String loadFromUrl​(URL url)
      Deprecated.
      Tries to load the configuration from the URL url.
      Parameters:
      url - URL path
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • loadFromUrl

      static String loadFromUrl​(URL url, Charset charset)
      Deprecated.
      Tries to load the configuration from the URL url.
      Parameters:
      url - URL path
      charset - the charset used to load the configuration
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • FromInputStream

      static ConfigurationLoader FromInputStream​(InputStream inputStream)
      Deprecated.
      Tries to load the configuration from the InputStream inputStream.
      Parameters:
      inputStream - the stream to read from
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded
    • FromInputStream

      static ConfigurationLoader FromInputStream​(InputStream inputStream, Charset charset)
      Deprecated.
      Tries to load the configuration from the InputStream inputStream.
      Parameters:
      inputStream - the stream to read from
      charset - the charset used to load the configuration
      Returns:
      the configuration
      Throws:
      StorageConfigurationException - if the configuration couldn't be loaded