Package org.apache.commons.configuration

Examples of org.apache.commons.configuration.Configuration.containsKey()


      List<String> backends = new ArrayList<String>();
      if (numPreferredNodes > 0) {
        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred
         * nodes. */
        if (!conf.containsKey(BACKENDS)) {
          LOG.fatal("Missing configuration backend list, which is needed to randomly select " +
                    "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")");
        }
        for (String node : conf.getStringArray(BACKENDS)) {
          backends.add(node);
View Full Code Here


      List<String> backends = new ArrayList<String>();
      if (numPreferredNodes > 0) {
        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred
         * nodes. */
        if (!conf.containsKey(BACKENDS)) {
          LOG.fatal("Missing configuration backend list, which is needed to randomly select " +
                    "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")");
        }
        for (String node : conf.getStringArray(BACKENDS)) {
          backends.add(node);
View Full Code Here

          LOG.fatal("Number of backends smaller than number of preferred nodes!");
        }
      }

      List<UserInfo> users = new ArrayList<UserInfo>();
      if (conf.containsKey(USERS)) {
        for (String userSpecification : conf.getStringArray(USERS)) {
          LOG.debug("Reading user specification: " + userSpecification);
          String[] parts = userSpecification.split(":");
          if (parts.length != 3) {
            LOG.error("Unexpected user specification string: " + userSpecification +
View Full Code Here

      List<String> backends = new ArrayList<String>();
      if (numPreferredNodes > 0) {
        /* Attempt to parse the list of slaves, which we'll need to (randomly) select preferred
         * nodes. */
        if (!conf.containsKey(BACKENDS)) {
          LOG.fatal("Missing configuration backend list, which is needed to randomly select " +
                    "preferred nodes (num_preferred_nodes set to " + numPreferredNodes + ")");
        }
        for (String node : conf.getStringArray(BACKENDS)) {
          backends.add(node);
View Full Code Here

          LOG.fatal("Number of backends smaller than number of preferred nodes!");
        }
      }

      List<UserInfo> users = new ArrayList<UserInfo>();
      if (conf.containsKey(USERS)) {
        for (String userSpecification : conf.getStringArray(USERS)) {
          LOG.debug("Reading user specification: " + userSpecification);
          String[] parts = userSpecification.split(":");
          if (parts.length != 3) {
            LOG.error("Unexpected user specification string: " + userSpecification +
View Full Code Here

     
      // jclouds configuration for providers are not prefixed with jclouds.
      for (String key : BLOBSTORE_KEYS) {
        for (String property : PROVIDER_PROPERTIES) {
          String prefixedProperty = "jclouds." + key + "." + property;
          if (jcloudsConfig.containsKey(prefixedProperty))
            jcloudsConfig.setProperty(key + "." + property,
                jcloudsConfig.getProperty(prefixedProperty));
        }
      }
View Full Code Here

      // jclouds configuration for providers are not prefixed with jclouds.
      for (String key : COMPUTE_KEYS) {
        for (String property : PROVIDER_PROPERTIES) {
          String prefixedProperty = "jclouds." + key + "." + property;

          if (jcloudsConfig.containsKey(prefixedProperty)) {
            jcloudsConfig.setProperty(key + "." + property,
                jcloudsConfig.getProperty(prefixedProperty));
          }
        }
      }
View Full Code Here

        }
        while (it.hasNext() && list.isEmpty())
        {
            Configuration config = it.next();
            if ((config != containerConfiguration || containerConfigurationChanged)
                    && config.containsKey(key))
            {
                appendListProperty(list, config, key);
            }
        }
View Full Code Here

    }

    private boolean getDefaultedBoolean(String attribute)
    {
        final Configuration config = _vHostConfig.getConfig();
        if(config.containsKey("queues."+attribute))
        {
            final boolean defaultValue = config.getBoolean("queues." + attribute);
            return getBooleanValue(attribute, defaultValue);
        }
        else
View Full Code Here

    public int getPriorities()
    {
        final Configuration config = _vHostConfig.getConfig();

        int defaultValue;
        if(config.containsKey("queues.priorities"))
        {
            defaultValue = config.getInt("queues.priorities");
        }
        else
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.