コード例 #1
0
 /**
  * This method will check to see if the property file needs to be refreshed and if it does, it
  * will reload it. Otherwise it will leave it as is.
  *
  * @param propertyFile The name of the property file that is being checked and possibly loaded.
  * @throws PropertyAccessException If an error occurs during the load process, this exception is
  *     thrown.
  */
 private synchronized void checkForRefreshAndLoad(String propertyFile)
     throws PropertyAccessException {
   if (refreshHandler.needsRefresh(propertyFile)) {
     loadPropertyFile(propertyFile);
   }
 }
コード例 #2
0
  /**
   * If a property file has been cached, this will force a refresh of the property file. If a
   * property file is not cached, then this operation will do nothing.
   *
   * @param propertyFile The name of the property file.
   * @throws PropertyAccessException This is thrown if an error occurs accessing the property.
   */
  public synchronized void forceRefresh(String propertyFile) throws PropertyAccessException {
    validateInput(propertyFile);

    loadPropertyFile(propertyFile);
  }