Reloads the configuration file.

@return the location of the file.
504844
private String reloadConfiguration() {
        String location = System.getProperty(APPLICATION_CONFIGURATION);
        if (location == null) {
            location = "conf/application.conf";
        }

        Config configuration = loadConfiguration(location);

        if (configuration == null) {
            throw new IllegalStateException("Cannot load the application configuration (" + location + ") - Wisdom cannot " +
                    "work properly without such configuration");
        }

        setConfiguration(configuration);

        return location;
    }
43396
public synchronized Configuration loadConfiguration() {
    if (configurationBuffer.position(0).readByte() == 1) {
      int bytesLength = configurationBuffer.readInt();
      if (bytesLength == 0) {
        return null;
      }
      return serializer.decode(configurationBuffer.readBytes(bytesLength));
    }
    return null;
  }
479440
public void load(String file) {
		Context context = factory.enterContext();
		
		try {
			URL url = Thread.currentThread().getContextClassLoader().getResource(file);
			
			if (url == null) {
				logger.debug("Configuration [" + file + "] does not exist");
				return;
			}
			
			File f = new File(url.getPath());
			
			if (f.exists()) {
				logger.info("Loading configuration [" + file + "]");
				context.evaluateReader(scope, new FileReader(f), file.substring(file.lastIndexOf("/") + 1), 1, null);
			}
			
		} catch (Exception e) {
			logger.error("Failed to load configuration [" + file + "]", e);
			throw new UncheckedException(e);
		} finally {
			Context.exit();
		}
	}
874142
private synchronized void reloadLocations() {
    map.clear();
    for (HadoopServer location : ServerRegistry.getInstance().getServers())
      map.put(location, new DFSLocation(provider, location));
  }
882896
def reload(self):
        
        self._conf = configparser.ConfigParser()
        # Preserve the case of sections and keys.
        self._conf.optionxform = str
        self._conf.read(self.config_file_path)
        if 'general' not in self._conf.keys():
            raise IncompleteConfigurationFile('Missing the general section')
        general = self._replace_data_types(dict(self._conf.items('general')))
        self._conf.remove_section('general')
        plugin = []
        for section in self._conf.sections():
            plugin.append(dict(self._conf.items(section)))
            plugin[-1].update({'name': section})
            plugin[-1] = self._replace_data_types(plugin[-1])
        return (plugin, general)
64415
@Override
  public final Parameters load(final File configFile) throws IOException {
    final Loading loading = new Loading();
    loading.topLoad(configFile);
    return Parameters.fromMap(loading.ret);
  }
427864
public static File getRunningLocation() throws Exception {
        String codePath = FileUtil.class.getProtectionDomain().getCodeSource().getLocation().getPath();
        String decodedPath = URLDecoder.decode(codePath, "UTF-8");
        File codeFile = new File(decodedPath);
        if (!codeFile.exists()) {
            throw new Exception("Cannot locate running location of JBake!");
        }
        File codeFolder = codeFile.getParentFile().getParentFile();
        if (!codeFolder.exists()) {
            throw new Exception("Cannot locate running location of JBake!");
        }

        return codeFolder;
    }
210292
public function load(): Configuration
    {
        $this->logger->info(self::CONFIG_PATH . ' = ' . $this->getPath());
        $this->logger->info(self::STAGE . ' = ' . $this->getStage());

        if ($this->getPath() !== self::DEFAULT_CONFIG_PATH) {
            $message = 'Please use default [%s] configuration location instead of [%s]. If you use configuration locally, ignore this message.';
            $this->logger->warning(sprintf($message, self::DEFAULT_CONFIG_PATH, $this->getPath()));
        }

        $second = $this->getStage() !== self::DEFAULT_STAGE
            ? $this->parseConfiguration($this->getStage())
            : [];

        $this->config = $this->arrayMergeRecursive(
            $this->parseConfiguration(),
            $second
        );

        $this->logger->info('Configuration loaded.');

        return $this;
    }
838910
def reload(self):
        """"""
        self.read_notmuch_config(self._notmuchconfig.filename)
        self.read_config(self._config.filename)
174930
public URI location() {
		String loc = http().getHeaderField("Location");
		if (loc != null) {
			return URI.create(loc);
		}
		return null;
	}
561233
def read(self):
        
        logger.info("Reloading %s ..." % self.__configfile)

        # smash the previous config
        self._configparser = configparser.SafeConfigParser()
        self._configparser.read([self.__configfile])

        sections = set()
        for setting in self.settings.values():
            sections.add(setting.section)
        for section in sections:
            # make sure that all the sections exist
            if not self._configparser.has_section(section):
                self._configparser.add_section(section)

        for setting in self.settings.values():
            setting.load(self._configparser)
1244711
public File getBootFile() {
        if (bootFile == null) {
            synchronized (this) {
                if (bootFile == null) {
                    if (bootFileReset) {
                        //Reset the done bootup and the sequence, so that the old file we are reloading from
                        // overwrites the main file on successful boot, and history is reset as when booting new
                        doneBootup.set(false);
                        sequence.set(0);
                    }
                    // If it's a reload with no new boot file name and we're persisting our config, we boot from mainFile,
                    // as that's where we persist
                    if (bootFileReset && !interactionPolicy.isReadOnly() && newReloadBootFileName == null) {
                        // we boot from mainFile
                        bootFile = mainFile;
                    } else {
                        // It's either first boot, or a reload where we're not persisting our config or with a new boot file.
                        // So we need to figure out which file we're meant to boot from

                        String bootFileName = this.bootFileName;
                        if (newReloadBootFileName != null) {
                            //A non-null new boot file on reload takes precedence over the reloadUsingLast functionality
                            //A new boot file was specified. Use that and reset the new name to null
                            bootFileName = newReloadBootFileName;
                            newReloadBootFileName = null;
                        } else if (interactionPolicy.isReadOnly() && reloadUsingLast) {
                            //If we were reloaded, and it is not a persistent configuration we want to use the last from the history
                            bootFileName = LAST;
                        }
                        boolean usingRawFile = bootFileName.equals(rawFileName);
                        if (usingRawFile) {
                            bootFile = mainFile;
                        } else {
                            bootFile = determineBootFile(configurationDir, bootFileName);
                            try {
                                bootFile = bootFile.getCanonicalFile();
                            } catch (IOException ioe) {
                                throw ControllerLogger.ROOT_LOGGER.canonicalBootFileNotFound(ioe, bootFile);
                            }
                        }


                        if (!bootFile.exists()) {
                            if (!usingRawFile) { // TODO there's no reason usingRawFile should be an exception,
                                // but the test infrastructure stuff is built around an assumption
                                // that ConfigurationFile doesn't fail if test files are not
                                // in the normal spot
                                if (bootFileReset || interactionPolicy.isRequireExisting()) {
                                    throw ControllerLogger.ROOT_LOGGER.fileNotFound(bootFile.getAbsolutePath());
                                }
                            }
                            // Create it for the NEW and DISCARD cases
                            if (!bootFileReset && !interactionPolicy.isRequireExisting()) {
                                createBootFile(bootFile);
                            }
                        } else if (!bootFileReset) {
                            if (interactionPolicy.isRejectExisting() && bootFile.length() > 0) {
                                throw ControllerLogger.ROOT_LOGGER.rejectEmptyConfig(bootFile.getAbsolutePath());
                            } else if (interactionPolicy.isRemoveExisting() && bootFile.length() > 0) {
                                if (!bootFile.delete()) {
                                    throw ControllerLogger.ROOT_LOGGER.cannotDelete(bootFile.getAbsoluteFile());
                                }
                                createBootFile(bootFile);
                            }
                        } // else after first boot we want the file to exist
                    }
                }
            }
        }
        return bootFile;
    }
930470
def reload(self):
        
        logging.debug('Reloading config file as files have been modified.')
        self.config.plugin, self.config.general = self.config.reload()
        logging.debug('Reloading plugins as files have been modified.')
        self.loader = plugin_manager.PluginLoader(
            self._plugin_path, self.config.plugin)
        self._plugin_mod_time = os.path.getmtime(self._plugin_path)
        self._config_mod_time = os.path.getmtime(self._config_file_path)
695732
public void reloadConfigIfNecessary() {
    if (whitelistFile == null) {
      return;
    }
    long time = System.currentTimeMillis();
    if (time > lastReloadAttempt + CONFIG_RELOAD_INTERVAL) {
      lastReloadAttempt = time;
      try {
        File file = new File(whitelistFile);
        long lastModified = file.lastModified();
        if (lastModified > lastSuccessfulReload &&
            time > lastModified + configReloadWait) {
          reloadWhitelist();
          lastSuccessfulReload = time;
          lastReloadAttemptFailed = false;
        }
      } catch (Exception e) {
        // Throwing the error further out here won't help - the RPC thread
        // will catch it and report it in a loop. Instead, just log it and
        // hope somebody will notice from the log.
        // We log the error only on the first failure so we don't fill up the
        // server's log with these messages.
        if (!lastReloadAttemptFailed) {
          LOG.error("Failed to reload whitelist file - " +
              "will use existing allocations.", e);
        }
        lastReloadAttemptFailed = true;
      }
    }
  }
1348257
public File getFile()
   {
      File file = (File)this.getSource();
      
      if(file != null)
          FileMonitor.waitFor(file);
      
      return file;
  
   }
556466
public static File getPath(){
		if (path==null) {
			UserConfiguration config = new UserConfiguration();
			path = new File(config.getCacheFilePath());
		}
		return path;
	}
964094
public void refresh( Path file )
  {
    EditorHost editor = findTab( file );
    if( editor != null )
    {
      // The file is open in an editor, refresh it with the contents of the file

      try( Reader reader = PathUtil.createReader( file ) )
      {
        editor.refresh( StreamUtil.getContent( reader ) );
        setDirty( editor, false );
      }
      catch( IOException e )
      {
        throw new RuntimeException( e );
      }
    }

    FileTree root = FileTreeUtil.getRoot();
    FileTree node = root.find( file );

    if( node != null )
    {
      // Refresh the type system to include the changes
      IType type = node.getType();
      if( type != null )
      {
        reload( type );
      }
    }
  }