Gets local configuration. For explanation when it could die, see {@link #get()}
205
@Restricted(NoExternalUse.class)
    public static @Nonnull JenkinsLocationConfiguration getOrDie(){
        JenkinsLocationConfiguration config = JenkinsLocationConfiguration.get();
        if (config == null) {
            throw new IllegalStateException("JenkinsLocationConfiguration instance is missing. Probably the Jenkins instance is not fully loaded at this time.");
        }
        return config;
    }
1110798
public static String getConfigLocation() {
        if (configLocation == null) {
            String configLoc = System.getProperty(MDW_CONFIG_LOCATION);
            if (configLoc != null) {
                if (!configLoc.endsWith("/"))
                    configLoc = configLoc + "/";
                configLocation = configLoc;
                System.out.println("Loading configuration files from '" + new File(configLoc).getAbsolutePath() + "'");
            }
        }
        return configLocation;
    }
1216198
public ServiceCall<Configuration> getConfiguration(GetConfigurationOptions getConfigurationOptions) {
    Validator.notNull(getConfigurationOptions, "getConfigurationOptions cannot be null");
    String[] pathSegments = { "v1/environments", "configurations" };
    String[] pathParameters = { getConfigurationOptions.environmentId(), getConfigurationOptions.configurationId() };
    RequestBuilder builder = RequestBuilder.get(RequestBuilder.constructHttpUrl(getEndPoint(), pathSegments,
        pathParameters));
    builder.query("version", versionDate);
    Map<String, String> sdkHeaders = SdkCommon.getSdkHeaders("discovery", "v1", "getConfiguration");
    for (Entry<String, String> header : sdkHeaders.entrySet()) {
      builder.header(header.getKey(), header.getValue());
    }
    builder.header("Accept", "application/json");
    return createServiceCall(builder.build(), ResponseConverterUtils.getObject(Configuration.class));
  }
617269
static String getFetchCommand(Config localConfig, Config clusterConfig, Config runtime) {
    return String.format("%s -u %s -f . -m local -p %s -d %s",
        Context.downloaderBinary(clusterConfig),
        Runtime.topologyPackageUri(runtime).toString(), Context.heronConf(localConfig),
        Context.heronHome(clusterConfig));
  }
190934
public static Configuration getConfiguration(){
        if(configurations == null){
            configurations = ConfigurationFactory.getConfiguration();
            LOGGER.info("Initialized the Configurations.");
        }
        return configurations;
    }
23754
@Override
  public ConfigurationParser get() {
    try {
      ConfigurationParser parser = parserConstructor.newInstance();
      parser.setConfigurationClasses(configurationClasses);
      parser.setEnvironment(System.getProperty("com.meltmedia.cadmium.environment"));
      return parser;
    } catch (Exception e) {
      logger.error("Failed to create a new ConfigurationParser Instance.", e);
      throw new RuntimeException("Failed to create a new ConfigurationParser Instance.");
    }
  }
1160081
@Override
   public <K, V> RemoteCache<K, V> getCache() {
      return getCache(configuration.forceReturnValues());
   }
164863
@Override
  public String saveConfig() {
    try {
      T config = getConfig();
      if (config == null) {
        return "No configuration to save";
      }

      ConfigurationStore cs = getStore();

      config.setName(configName);

      cs.saveConfiguration(config);

      return "saved";
    } catch (Throwable t) {
      error(t);
      return t.getLocalizedMessage();
    }
  }
608408
public static String getLocalHostPort() {
        String defaultPort = SystemPropertiesUtils.getSystemProperty(
                NaviCommonConstant.SYSTEM_PROPERTY_SERVER_PORT_FROM_SLASH_D_4JPAAS1,
                NaviCommonConstant.SYSTEM_PROPERTY_SERVER_PORT_FROM_ENV_4JPAAS1, ""
                        + RpcServerConf.SERVER_PORT);
        return SystemPropertiesUtils.getSystemProperty(
                NaviCommonConstant.SYSTEM_PROPERTY_SERVER_PORT_FROM_ENV_4JPAAS2, defaultPort);
    }
369886
ClusterConfiguration getLastConfigWithin(Zxid zxid) throws IOException {
    String pattern = "cluster_config\\.\\d+_-?\\d+";
    String zxidFileName = "cluster_config." + zxid.toSimpleString();
    String lastFileName = null;

    for (File file : this.rootDir.listFiles()) {
      if (!file.isDirectory() && file.getName().matches(pattern)) {
        String fileName = file.getName();
        if (lastFileName == null && fileName.compareTo(zxidFileName) <= 0) {
          lastFileName = fileName;
        } else if (lastFileName != null &&
                   fileName.compareTo(lastFileName) > 0 &&
                   fileName.compareTo(zxidFileName) <= 0) {
          lastFileName = fileName;
        }
      }
    }
    if (lastFileName == null) {
      return null;
    }
    File file = new File(this.rootDir, lastFileName);
    try {
      Properties prop = FileUtils.readPropertiesFromFile(file);
      return ClusterConfiguration.fromProperties(prop);
    } catch (FileNotFoundException e) {
      LOG.debug("AckConfig file doesn't exist, probably it's the first time" +
          "bootup.");
    }
    return null;
  }
1036255
@Trivial
    @Override
    public int getLocalPort() {
        int port = this.connection.getLocalPort();
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getLocalPort: " + port);
        }
        return port;
    }
867427
@Override
  public Configuration loadConfig() throws ConfigurationException, IOException {

    Configuration resultConfig = new Configuration();

    if (!Utils.localFileExists(this.getConfigFileName())) {
      // String configFileName = System.getenv(ConfigConstant.DDF_INI_ENV_VAR.getValue());
      File file = new File(this.locateConfigFileName(this.getConfigDir(), this.getConfigFileName()));
      mConfigDir = file.getParentFile().getName();
      mConfigFileName = file.getCanonicalPath();
    }

    if (!Utils.localFileExists(this.getConfigFileName())) return null;

    HierarchicalINIConfiguration config = new HierarchicalINIConfiguration(this.getConfigFileName());

    @SuppressWarnings("unchecked")
    Set<String> sectionNames = config.getSections();
    for (String sectionName : sectionNames) {
      SubnodeConfiguration section = config.getSection(sectionName);
      if (section != null) {
        Configuration.Section resultSection = resultConfig.getSection(sectionName);

        @SuppressWarnings("unchecked")
        Iterator<String> keys = section.getKeys();
        while (keys.hasNext()) {
          String key = keys.next();
          String value = section.getString(key);
          if (value != null) {
            resultSection.set(key, value);
          }
        }
      }
    }

    mConfig = resultConfig;
    return mConfig;
  }
320186
public static LocalCall<String> get(String key) {
        return new LocalCall<>(
            "config.get",
            Optional.of(Arrays.asList(key)),
            Optional.empty(),
            new TypeToken<String>() { });
    }
729313
private Configuration getConfigurationInternal(final String[] keys) {

		Configuration conf = new Configuration();

		synchronized (this.confData) {

			final Iterator<String> it = this.confData.keySet().iterator();

			while (it.hasNext()) {

				final String key = it.next();
				boolean found = false;
				if (keys != null) {
					for (int i = 0; i < keys.length; i++) {
						if (key.equals(keys[i])) {
							found = true;
							break;
						}
					}

					if (found) {
						conf.setString(key, this.confData.get(key));
					}
				} else {
					conf.setString(key, this.confData.get(key));
				}
			}
		}

		return conf;
	}
274630
@RequestMapping(value = "configurations/{name:.*}", method = RequestMethod.GET)
    public SVNConfiguration getConfiguration(@PathVariable String name) {
        return svnConfigurationService.getConfiguration(name);
    }
687165
@Override
  public Config getOwnConfig(final ConfigKeyPath configKey) {
    try {
      return this.ownConfigCache.get(configKey, new Callable<Config>() {
        @Override
        public Config call()  {
          return InMemoryValueInspector.this.valueFallback.getOwnConfig(configKey);
        }
      });
    } catch (ExecutionException e) {
      // should NOT come here
      throw new RuntimeException("Can not getOwnConfig for " + configKey);
    }
  }
579836
function readFromLocalConfig(parent){
    return readFile(config_file(parent), "utf8")
        .then(function(contents){
            return JSON.parse(contents);
        })
        .catch(function(){
            return {
                data: {},
                installed: [],
            };
        });
}