Reload the pools config and update all in-memory values
@throws ParserConfigurationException
@throws SAXException
@throws IOException
165924
private void reloadPoolsConfig()
      throws IOException, SAXException, ParserConfigurationException {
    if (poolsConfigFileName == null) {
      return;
    }
    Set<String> newPoolGroupNameSet = new HashSet<String>();
    Set<PoolInfo> newPoolInfoSet = new HashSet<PoolInfo>();
    TypePoolGroupNameMap<Integer> newTypePoolNameGroupToMax =
        new TypePoolGroupNameMap<Integer>();
    TypePoolGroupNameMap<Integer> newTypePoolNameGroupToMin =
        new TypePoolGroupNameMap<Integer>();
    TypePoolInfoMap<Integer> newTypePoolInfoToMax =
        new TypePoolInfoMap<Integer>();
    TypePoolInfoMap<Integer> newTypePoolInfoToMin =
        new TypePoolInfoMap<Integer>();
    Map<PoolInfo, ScheduleComparator> newPoolInfoToComparator =
        new HashMap<PoolInfo, ScheduleComparator>();
    Map<PoolInfo, Double> newPoolInfoToWeight =
        new HashMap<PoolInfo, Double>();
    Map<PoolInfo, Integer> newPoolInfoToPriority =
        new HashMap<PoolInfo, Integer>();
    Map<PoolInfo, String> newPoolInfoToWhitelist = 
        new HashMap<PoolInfo, String>();

    Map<PoolInfo, PoolInfo> newJobExceedsLimitPoolRedirect = new HashMap<PoolInfo, PoolInfo>();
    Map<PoolInfo, Long> newPoolJobSizeLimit = new HashMap<PoolInfo, Long>();

    Element root = getRootElement(poolsConfigFileName);
    NodeList elements = root.getChildNodes();
    for (int i = 0; i < elements.getLength(); ++i) {
      Node node = elements.item(i);
      if (!(node instanceof Element)) {
        continue;
      }
      Element element = (Element) node;
      if (matched(element, GROUP_TAG_NAME)) {
        String groupName = element.getAttribute(NAME_ATTRIBUTE);
        if (!newPoolGroupNameSet.add(groupName)) {
          LOG.debug("Already added group " + groupName);
        }
        NodeList groupFields = element.getChildNodes();
        for (int j = 0; j < groupFields.getLength(); ++j) {
          Node groupNode = groupFields.item(j);
          if (!(groupNode instanceof Element)) {
            continue;
          }
          Element field = (Element) groupNode;
          for (ResourceType type : TYPES) {
            if (matched(field, MIN_TAG_NAME_PREFIX + type)) {
              int val = Integer.parseInt(getText(field));
              newTypePoolNameGroupToMin.put(type, groupName, val);
            }
            if (matched(field, MAX_TAG_NAME_PREFIX + type)) {
              int val = Integer.parseInt(getText(field));
              newTypePoolNameGroupToMax.put(type, groupName, val);
            }
          }
          if (matched(field,REDIRECT_JOB_WITH_LIMIT)){
            loadPoolInfoToRedirect(groupName,
                                  field.getAttribute(SOURCE_ATTRIBUTE),
                                  field.getAttribute(DESTINATION_ATTRIBUTE),
                                  field.getAttribute(JOB_INPUT_SIZE_LIMIT_ATTRIBUTE),
                                  newJobExceedsLimitPoolRedirect,
                                  newPoolJobSizeLimit);
          }
          if (matched(field, POOL_TAG_NAME)) {
            PoolInfo poolInfo = new PoolInfo(groupName,
                                             field.getAttribute("name"));
            if (!newPoolInfoSet.add(poolInfo)) {
              LOG.warn("Already added pool info " + poolInfo);
            }
            NodeList poolFields = field.getChildNodes();
            for (int k = 0; k < poolFields.getLength(); ++k) {
              Node poolNode = poolFields.item(k);
              if (!(poolNode instanceof Element)) {
                continue;
              }
              Element poolField = (Element) poolNode;
              for (ResourceType type : TYPES) {
                if (matched(poolField, MIN_TAG_NAME_PREFIX + type)) {
                  int val = Integer.parseInt(getText(poolField));
                  newTypePoolInfoToMin.put(type, poolInfo, val);
                }
                if (matched(poolField, MAX_TAG_NAME_PREFIX + type)) {
                  int val = Integer.parseInt(getText(poolField));
                  newTypePoolInfoToMax.put(type, poolInfo, val);
                }
              }
              if (matched(poolField, PREEMPTABILITY_MODE_TAG_NAME)) {
                boolean val = Boolean.parseBoolean(getText(poolField));
                if (!val) {
                  nonPreemptablePools.add(poolInfo);
                }
              }
              if (matched(poolField, REQUEST_MAX_MODE_TAG_NAME)) {
                boolean val = Boolean.parseBoolean(getText(poolField));
                if (val) {
                  requestMaxPools.add(poolInfo);
                }
              }
              if (matched(poolField, SCHEDULING_MODE_TAG_NAME)) {
                ScheduleComparator val =
                    ScheduleComparator.valueOf(getText(poolField));
                newPoolInfoToComparator.put(poolInfo, val);
              }
              if (matched(poolField, WEIGHT_TAG_NAME)) {
                double val = Double.parseDouble(getText(poolField));
                newPoolInfoToWeight.put(poolInfo, val);
              }
              if (matched(poolField, PRIORITY_TAG_NAME)) {
                int val = Integer.parseInt(getText(poolField));
                newPoolInfoToPriority.put(poolInfo, val);
              }
              if (matched(poolField, WHITELIST_TAG_NAME)) {
                newPoolInfoToWhitelist.put(poolInfo, getText(poolField));
              }
            }
          }
        }
      }
    }
    synchronized (this) {
      this.poolGroupNameSet = newPoolGroupNameSet;
      this.poolInfoSet = Collections.unmodifiableSet(newPoolInfoSet);
      this.typePoolGroupNameToMax = newTypePoolNameGroupToMax;
      this.typePoolGroupNameToMin = newTypePoolNameGroupToMin;
      this.typePoolInfoToMax = newTypePoolInfoToMax;
      this.typePoolInfoToMin = newTypePoolInfoToMin;
      this.poolInfoToComparator = newPoolInfoToComparator;
      this.poolInfoToWeight = newPoolInfoToWeight;
      this.poolInfoToPriority = newPoolInfoToPriority;
      this.poolInfoToWhitelist = newPoolInfoToWhitelist;
      this.jobExceedsLimitPoolRedirect = newJobExceedsLimitPoolRedirect;
      this.poolJobSizeLimit = newPoolJobSizeLimit;
    }
  }
1104147
public void updateByXml(Source source) throws IOException {
        checkPermission(CONFIGURE);
        XmlFile configXmlFile = getConfigFile();
        final AtomicFileWriter out = new AtomicFileWriter(configXmlFile.getFile());
        try {
            try {
                XMLUtils.safeTransform(source, new StreamResult(out));
                out.close();
            } catch (TransformerException | SAXException e) {
                throw new IOException("Failed to persist config.xml", e);
            }

            // try to reflect the changes by reloading
            Object o = new XmlFile(Items.XSTREAM, out.getTemporaryFile()).unmarshalNullingOut(this);
            if (o!=this) {
                // ensure that we've got the same job type. extending this code to support updating
                // to different job type requires destroying & creating a new job type
                throw new IOException("Expecting "+this.getClass()+" but got "+o.getClass()+" instead");
            }

            Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<Void,IOException>() {
                @Override public Void call() throws IOException {
                    onLoad(getParent(), getRootDir().getName());
                    return null;
                }
            });
            Jenkins.getInstance().rebuildDependencyGraphAsync();

            // if everything went well, commit this new version
            out.commit();
            SaveableListener.fireOnChange(this, getConfigFile());

        } finally {
            out.abort(); // don't leave anything behind
        }
    }
1269573
void reset(com.ibm.wsspi.bytebuffer.WsByteBuffer buff, RichByteBufferPool p)
   {
      this.buffer = buff;
      this.pool = p;
   }
170043
public void save() throws IOException {
        if(BulkChange.contains(this))   return;
        XmlFile config = getConfigXml();
        config.write(this);
        SaveableListener.fireOnChange(this, config);
    }
228910
public static synchronized void reloadExistingConfigurations() {
		if (LOG.isDebugEnabled()) {
			LOG.debug("Reloading " + REGISTRY.keySet().size()
					+ " existing configurations");
		}
		for (Configuration conf : REGISTRY.keySet()) {
			conf.reloadConfiguration();
		}
	}
326010
public ChangeSet read(final InputSource in) throws SAXException,
                                                  IOException {
        return (ChangeSet) this.parser.read( in );
    }
889437
public void reload() {

        List<CmsModule> modules = OpenCms.getModuleManager().getAllInstalledModules();
        @SuppressWarnings("unchecked")
        BeanItemContainer<CmsModuleRow> container = (BeanItemContainer<CmsModuleRow>)getContainerDataSource();
        container.removeAllItems();
        List<CmsModuleRow> newRows = Lists.newArrayList();
        for (CmsModule module : modules) {
            CmsModuleRow row = new CmsModuleRow(module);
            newRows.add(row);
        }
        container.addAll(newRows);
        sort();
        updateCounter();
    }
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;
      }
    }
  }
1058281
public void reload()
    {
        InfinispanCache.get().<UUID, SystemConfiguration>getCache(SystemConfiguration.UUIDCACHE).remove(uuid);
        InfinispanCache.get().<Long, SystemConfiguration>getCache(SystemConfiguration.IDCACHE).remove(id);
        InfinispanCache.get().<String, SystemConfiguration>getCache(SystemConfiguration.NAMECACHE).remove(name);
    }
465872
public final synchronized void initialize(Map<String,String> configuration)
    {
        if(this.initialized)
        {
            throw new FaxException("Request parser already initialized.");
        }
        
        //set flag
        this.initialized=true;
        
        //initialize
        this.initializeImpl(configuration);
    }
561897
@Override
    protected synchronized void loadConfiguration() throws IOException {
        final ObjectMapper mapper = new ObjectMapper(new YAMLFactory());
        final TypeReference<HashMap<String, String>> typeRef = new TypeReference<HashMap<String, String>>() {};
        namespaces = mapper.readValue(new File(configPath), typeRef);
    }
898810
private void applyPoolConfiguration(PoolConfiguration pc,
                                       org.ironjacamar.common.api.metadata.common.Timeout t)
   {
      if (t != null)
      {
         if (t.getBlockingTimeoutMillis() != null)
            pc.setBlockingTimeout(t.getBlockingTimeoutMillis().longValue());
         
         if (t.getIdleTimeoutMinutes() != null)
            pc.setIdleTimeoutMinutes(t.getIdleTimeoutMinutes().intValue());
      }
   }
434099
public void loadXmlConfiguration() throws SAXException, IOException {

        URL baseUrl = m_baseFolder.toURI().toURL();
        if (LOG.isDebugEnabled()) {
            LOG.debug(Messages.get().getBundle().key(Messages.LOG_BASE_URL_1, baseUrl));
        }

        // first load the base configuration
        loadXmlConfiguration(baseUrl, this);

        // now iterate all sub-configurations
        Iterator<I_CmsXmlConfiguration> i = m_configurations.iterator();
        while (i.hasNext()) {
            loadXmlConfiguration(baseUrl, i.next());
        }

        // remove the old backups
        removeOldBackups(MAX_BACKUP_DAYS);
    }
904810
public void reloadClasses()
    {
        File triggerDirectory = FBUtilities.cassandraTriggerDir();
        if (triggerDirectory == null)
            return;
        customClassLoader = new CustomClassLoader(parent, triggerDirectory);
        cachedTriggers.clear();
    }
389314
public void updateProperties(InputStream inputStream) {
        try {
            conf.load(inputStream);
            conf.putAll(System.getProperties());
        } catch (IOException e) {
            log.warn("Error loading system properties from input stream", e);
        }
    }
1065049
private void flushCharacters() throws org.xml.sax.SAXException
  {

    XSLTElementProcessor elemProcessor = getCurrentProcessor();

    if (null != elemProcessor)
      elemProcessor.startNonText(this);
  }
1051095
@PostConstruct
	protected void init() throws IOException {
		// base configuration from XML file
		if (null != configurationFile) {
			log.debug("Get base configuration from {}", configurationFile);
			manager = new DefaultCacheManager(configurationFile);
		} else {
			GlobalConfigurationBuilder builder = new GlobalConfigurationBuilder();
			builder.globalJmxStatistics().allowDuplicateDomains(true);
			manager = new DefaultCacheManager(builder.build());
		}

		if (listener == null) {
			listener = new InfinispanCacheListener();
		}
		manager.addListener(listener);

		// cache for caching the cache configurations (hmmm, sounds a bit strange)
		Map<String, Map<CacheCategory, CacheService>> cacheCache = 
				new HashMap<String, Map<CacheCategory, CacheService>>();

		// build default configuration
		if (null != defaultConfiguration) {
			setCaches(cacheCache, null, defaultConfiguration);
		}

		// build layer specific configurations
		for (Layer layer : layerMap.values()) {
			CacheInfo ci = configurationService.getLayerExtraInfo(layer.getLayerInfo(), CacheInfo.class);
			if (null != ci) {
				setCaches(cacheCache, layer, ci);
			}
		}
	}