All Downloads are FREE. Search and download functionalities are using the official Maven repository.

kz.greetgo.conf.hot.ConfigStorage Maven / Gradle / Ivy

There is a newer version: 2.0.5
Show newest version
package kz.greetgo.conf.hot;

import java.util.Date;

/**
 * Config storage interface. Is is used by library to store config data. You can redefine it to store config any where.
 * It is used in {@link AbstractConfigFactory} to access to config storing data.
 */
public interface ConfigStorage {

  /**
   * Loads and returns config content
   *
   * @param configLocation config location
   * @return config content
   */
  String loadConfigContent(String configLocation) throws Exception;

  /**
   * Checks config content exists
   *
   * @param configLocation config location
   * @return check status
   */
  boolean isConfigContentExists(String configLocation) throws Exception;

  /**
   * Saves config content
   *
   * @param configLocation config location
   * @param configContent  content of config
   */
  void saveConfigContent(String configLocation, String configContent) throws Exception;

  /**
   * Returns last changed timestamp
   *
   * @param configLocation config location
   * @return last changed timestamp, or null, if file is absent
   */
  Date getLastChangedAt(String configLocation) throws Exception;

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy