예제 #1
0
 private void setMD5(String md5, CruiseConfig badConfig) {
   try {
     MagicalGoConfigXmlLoader.setMd5(badConfig, md5);
   } catch (NoSuchFieldException | IllegalAccessException e) {
     // Ignore
   }
 }
예제 #2
0
    protected ConfigSaveState saveConfig(final String xmlString, final String md5)
        throws Exception {
      LOGGER.debug("[Config Save] Started saving XML");
      final MagicalGoConfigXmlLoader configXmlLoader =
          new MagicalGoConfigXmlLoader(configCache, registry);

      LOGGER.debug("[Config Save] Updating config");
      final CruiseConfig deserializedConfig = configXmlLoader.deserializeConfig(xmlString);

      ConfigSaveState configSaveState =
          systemEnvironment.optimizeFullConfigSave()
              ? saveConfigNewFlow(deserializedConfig, md5)
              : saveConfigOldFlow(deserializedConfig, md5);

      LOGGER.debug("[Config Save] Finished saving XML");
      return configSaveState;
    }