Create a metric registry configuration object from the given {@link Configuration}.

@param configuration to generate the metric registry configuration from
@return Metric registry configuration generated from the configuration
774398
public static MetricRegistryConfiguration fromConfiguration(Configuration configuration) {
		ScopeFormats scopeFormats;
		try {
			scopeFormats = ScopeFormats.fromConfig(configuration);
		} catch (Exception e) {
			LOG.warn("Failed to parse scope format, using default scope formats", e);
			scopeFormats = ScopeFormats.fromConfig(new Configuration());
		}

		char delim;
		try {
			delim = configuration.getString(MetricOptions.SCOPE_DELIMITER).charAt(0);
		} catch (Exception e) {
			LOG.warn("Failed to parse delimiter, using default delimiter.", e);
			delim = '.';
		}

		final long maximumFrameSize = AkkaRpcServiceUtils.extractMaximumFramesize(configuration);

		// padding to account for serialization overhead
		final long messageSizeLimitPadding = 256;

		return new MetricRegistryConfiguration(scopeFormats, delim, maximumFrameSize - messageSizeLimitPadding);
	}
309317
public ActionDeclaration withConfiguration(java.util.Map<String, String> configuration) {
        setConfiguration(configuration);
        return this;
    }
626028
public String resolve( Map<String, String> configuration )
    {
        StringBuilder buffer = new StringBuilder();
        append( buffer, configuration, null );
        return buffer.toString();
    }
254775
protected void registerConfiguration(@Nonnull BeanConfiguration configuration) {
        ArgumentUtils.requireNonNull("configuration", configuration);
        beanConfigurations.put(configuration.getName(), configuration);
        ClassLoadingReporter.reportPresent(configuration.getClass());
    }
405616
public S setRegistry(RegistryConfig registry) {
        if (this.registry == null) {
            this.registry = new ArrayList<RegistryConfig>();
        }
        this.registry.add(registry);
        return castThis();
    }
911800
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public JIRAConfiguration newConfiguration(@RequestBody JIRAConfiguration configuration) {
        return jiraConfigurationService.newConfiguration(configuration);
    }
619118
public void setConfiguration(Configuration configuration) {

        this.configuration = configuration;

        // init ParamReaders with the new <Configuration>
        ParamReaders.getInstance().setConfiguration(configuration);

        // register as listener to configuration change
        FoundationConfigurationListenerRegistry.addFoundationConfigurationListener(this);

        // verify that all configured values are correct
        verifyConfiguration();

    }
597094
public static void generate(ConfigurationImpl configuration) {
        DocPath filename = DocPaths.DEPRECATED_LIST;
        try {
            DeprecatedListWriter depr =
                   new DeprecatedListWriter(configuration, filename);
            depr.generateDeprecatedListFile(
                   new DeprecatedAPIListBuilder(configuration));
            depr.close();
        } catch (IOException exc) {
            configuration.standardmessage.error(
                        "doclet.exception_encountered",
                        exc.toString(), filename);
            throw new DocletAbortException(exc);
        }
    }
415450
public MasterWebUIConfiguration setConfiguration(
      TreeSet<Triple<String, String, String>> configuration) {
    mConfiguration = configuration;
    return this;
  }
260830
@RequestMapping(value = "configurations/create", method = RequestMethod.POST)
    public ArtifactoryConfiguration newConfiguration(@RequestBody ArtifactoryConfiguration configuration) {
        return configurationService.newConfiguration(configuration);
    }
175141
public Configuration<T> setConfiguration(Map<String, String> configuration) {
        Validate.notNull(configuration, "Properties for configuration of recorder extension can not be a null object!");
        this.configuration = configuration;
        return this;
    }
10312
static JmxConfig from(Config config) {
    try {
      ObjectName query = new ObjectName(config.getString("query"));
      List<JmxMeasurementConfig> ms = new ArrayList<>();
      for (Config cfg : config.getConfigList("measurements")) {
        ms.add(JmxMeasurementConfig.from(cfg));
      }
      return new JmxConfig(query, ms);
    } catch (Exception e) {
      throw new IllegalArgumentException("invalid mapping config", e);
    }
  }
1313079
public static DropwizardMeterRegistry newRegistry(MetricRegistry registry,
                                                      HierarchicalNameMapper nameMapper,
                                                      Clock clock) {
        final DropwizardMeterRegistry meterRegistry = new DropwizardMeterRegistry(
                DEFAULT_DROPWIZARD_CONFIG,
                requireNonNull(registry, "registry"),
                requireNonNull(nameMapper, "nameMapper"),
                requireNonNull(clock, "clock")) {
            {
                // Do not add percentile or histogram value gauges to prevent Micrometer from creating
                // too many gauges. Dropwizard has its own distribution statistic calculation mechanism
                // although not perfect.
                config().meterFilter(new MeterFilter() {
                    @Override
                    public MeterFilterReply accept(Meter.Id id) {
                        if (id.getName().endsWith(".percentile") && id.getTag("phi") != null) {
                            return MeterFilterReply.DENY;
                        }
                        if (id.getName().endsWith(".histogram") && id.getTag("le") != null) {
                            return MeterFilterReply.DENY;
                        }
                        return MeterFilterReply.NEUTRAL;
                    }
                });
            }

            @Override
            protected Double nullGaugeValue() {
                return 0.0;
            }
        };

        meterRegistry.config().namingConvention(MoreNamingConventions.dropwizard());
        meterRegistry.config().pauseDetector(new NoPauseDetector());
        return meterRegistry;
    }
117197
public LocalDistribution getDistribution(WrapperConfiguration configuration) {
                String baseName = getDistName(configuration.getDistribution());
                String distName = removeExtension(baseName);
                String rootDirName = rootDirName(distName, configuration);

                String distDirPathName = configuration.getDistributionPath() + "/" + rootDirName;
                File distDir = new File(getBaseDir(configuration.getDistributionBase()), distDirPathName);

                String distZipFilename = configuration.getZipPath() + "/" + rootDirName + "/" + baseName;
                File distZip = new File(getBaseDir(configuration.getZipBase()), distZipFilename);

                return new LocalDistribution(distDir, distZip);
        }
1166233
public static DropwizardMeterRegistry newRegistry(MetricRegistry registry,
                                                      HierarchicalNameMapper nameMapper) {
        return newRegistry(registry, nameMapper, Clock.SYSTEM);
    }
1286355
public static DynamicConfigGenerator createDynamicConfigGenerator(Config config) {
    String dynamicConfigGeneratorClassName =
        ConfigUtils.getString(config, ConfigurationKeys.DYNAMIC_CONFIG_GENERATOR_CLASS_KEY,
            ConfigurationKeys.DEFAULT_DYNAMIC_CONFIG_GENERATOR_CLASS_KEY);

    try {
      ClassAliasResolver<DynamicConfigGenerator> aliasResolver =
          new ClassAliasResolver<>(DynamicConfigGenerator.class);
      return aliasResolver.resolveClass(dynamicConfigGeneratorClassName).newInstance();
    } catch (ReflectiveOperationException e) {
      throw new RuntimeException("Could not construct DynamicConfigGenerator " +
          dynamicConfigGeneratorClassName, e);
    }
  }
793498
public static ComponentFactory create(InputStream configuration) {
    ComponentFactory factory = null;
    factory = new ComponentFactory(LanguageConfigurationUtil.get(configuration));
    return factory;
  }