Examples of Config


Examples of org.aeonbits.owner.Config

    }

    @Test
    public void testRemoveUsingClassAsKey() {
        MyConfig first = ConfigCache.getOrCreate(MyConfig.class);
        Config removed = ConfigCache.remove(MyConfig.class);
        assertNotNull(removed);

        MyConfig second = ConfigCache.getOrCreate(MyConfig.class);
        MyConfig third = ConfigCache.getOrCreate(MyConfig.class);
View Full Code Here

Examples of org.apache.ambari.server.state.Config

      add(hostname1);
      add(hostname2);
    }};
   
    ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
    Config config = configFactory.createNew(cluster, "global",
        new HashMap<String,String>() {{ put("a", "b"); }});
    config.setVersionTag("version1");
    cluster.addConfig(config);
    cluster.addDesiredConfig("_test", config);
   
   
    clusters.mapHostsToCluster(hostNames, clusterName);
View Full Code Here

Examples of org.apache.axis2.rmi.deploy.config.Config

            ClassLoader deploymentClassLoader = deploymentFileData.getClassLoader();
            String absolutePath = deploymentFileData.getFile().getAbsolutePath();

            // gettting the file reader for zipinput stream
            Config configObject = getConfig(absolutePath);

            Configurator configurator = getConfigurator(configObject, deploymentClassLoader);

            Service[] services = configObject.getServices().getService();
            ClassDeployer classDeployer =
                    new ClassDeployer(configurationContext, deploymentClassLoader, configurator);
            Class serviceClass;

            for (int i = 0; i < services.length; i++) {
View Full Code Here

Examples of org.apache.beehive.netui.tools.testrecorder.shared.config.Config

        String uri = genUri( "http", server.getHostname(), server.getPort(), webapp.getServletUri() );
        HttpMethod method = new GetMethod( uri );
        queryParams[2] = configParam;
        method.setQueryString( queryParams );
        InputStream is = executeXMLRequest( method, uri, Constants.CONFIG_FILE );
        Config config = null;
        try {
            config = XMLHelper.getConfig( is, Constants.CONFIG_FILE );
        }
        catch ( Exception e ) {
            String msg = "ERROR: encountered exception processing resource( " + Constants.CONFIG_FILE + " )";
            log.fatal( msg, e );
            if ( e instanceof ConfigException ) {
                throw (ConfigException) e;
            }
            throw new ConfigException( msg, e );
        }
        finally {
            try {
                if ( is != null ) {
                    is.close();
                }
            }
            catch ( IOException e ) {
                if ( log.isWarnEnabled() ) {
                    log.warn( "WARNING: received exception closing HTTP stream for( " + Constants.CONFIG_FILE +
                            " )", e );
                }
                //ignore
            }
            method.releaseConnection();
        }
        if ( log.isInfoEnabled() ) {
            log.info( "config( " + config + " )" );
        }

        method = new GetMethod( uri );
        queryParams[2] = webappParam;
        method.setQueryString( queryParams );
        is = executeXMLRequest( method, uri, Constants.WEBAPPS_FILE );
        Webapps webapps = null;
        try {
            webapps = XMLHelper.getWebapps( is, Constants.WEBAPPS_FILE, config );
        }
        catch ( Exception e ) {
            String msg = "ERROR: encountered exception processing resource( " + Constants.WEBAPPS_FILE + " )";
            log.fatal( msg, e );
            if ( e instanceof ConfigException ) {
                throw (ConfigException) e;
            }
            throw new ConfigException( msg, e );
        }
        finally {
            try {
                if ( is != null ) {
                    is.close();
                }
            }
            catch ( IOException e ) {
                if ( log.isWarnEnabled() ) {
                    log.warn( "WARNING: received exception closing HTTP stream for( " + Constants.WEBAPPS_FILE +
                            " )", e );
                }
                // ignore
            }
            method.releaseConnection();
        }
        if ( log.isInfoEnabled() ) {
            log.info( "webapps( " + webapps + " )" );
        }

        method = new GetMethod( uri );
        queryParams[2] = testsParam;
        method.setQueryString( queryParams );
        is = executeXMLRequest( method, uri, Constants.TESTS_FILE );
        TestDefinitions testDefinitions = null;
        try {
            testDefinitions = XMLHelper.getTestDefinitionsInstance( is, Constants.TESTS_FILE, webapps,
                    config.getBaseDirectory().getAbsolutePath() );
        }
        catch ( Exception e ) {
            String msg = "ERROR: encountered exception processing resource( " + Constants.TESTS_FILE + " )";
            log.fatal( msg, e );
            if ( e instanceof ConfigException ) {
View Full Code Here

Examples of org.apache.cassandra.config.Config

        ConfigEditor editor = new ConfigEditor(configFile);
        editor.load();
        editor.setSeeds("127.0.0.1", "127.0.0.2", "127.0.0.3");
        editor.save();

        Config config = loadConfig();

        assertEquals(config.seed_provider.parameters.get("seeds"), "127.0.0.1,127.0.0.2,127.0.0.3",
            "Failed to update seeds property.");
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.GenericKeyedObjectPool.Config

 
  @Test
  public void testPoolExpiration() throws Exception {
    // Makes sure that a thrift client gets evicted (and therefore closed) if it is not
    // used for a certain amount of time.
    Config conf = ThriftClientPool.getPoolConfig();
   
    // We decrease the defaults here so the test runs in reasonable time
    conf.minEvictableIdleTimeMillis = 10;
    conf.timeBetweenEvictionRunsMillis = 50;
   
View Full Code Here

Examples of org.apache.commons.pool.impl.GenericObjectPool.Config

      {
        appPath = new File(scriptPath).getAbsolutePath();
      }
    }

    Config conf = new Config();

    conf.maxActive = PropertyUtils.getIntegerProperty(Properties.SIPATRA_POOL_MAX_ACTIVE_PROPERTY, -1, servletContext);
    conf.maxIdle = PropertyUtils.getIntegerProperty(Properties.SIPATRA_POOL_MAX_IDLE_PROPERTY, -1, servletContext);
    conf.maxWait = PropertyUtils.getIntegerProperty(Properties.SIPATRA_POOL_MAX_WAIT_PROPERTY, -1, servletContext);
    conf.minIdle = PropertyUtils.getIntegerProperty(Properties.SIPATRA_POOL_MIN_IDLE_PROPERTY, -1, servletContext);
View Full Code Here

Examples of org.apache.felix.obr.plugin.Config

            URI repositoryXml = ObrUtils.findRepositoryXml( mavenRepository, obrRepository );
            URI obrXmlFile = ObrUtils.findObrXml( project.getResources() );
            URI bundleJar = ObrUtils.findBundleJar( localRepository, project.getArtifact() );

            Config userConfig = new Config();

            update = new ObrUpdate( repositoryXml, obrXmlFile, project, bundleJar, mavenRepository, userConfig, log );

            update.updateRepository();
        }
View Full Code Here

Examples of org.apache.felix.obrplugin.Config

            try {

                URI acrXmlFile = ObrUtils.findObrXml(project);

                Config userConfig = new Config();

                update = new ObrUpdate(repoXML, acrXmlFile, project, repoPath, userConfig, log);
                update.parseRepositoryXml();

                updateLocalBundleMetadata(project.getArtifact(), update);
View Full Code Here

Examples of org.apache.flex.compiler.internal.config.annotations.Config

                // Collect configuration info from getXXXInfo() static methods.
                final ConfigurationInfo info = createInfo(method);

                // Collect configuration info from annotations.
                final Config config = method.getAnnotation(Config.class);
                if (config != null)
                {
                    info.isAdvanced = config.advanced();
                    info.isHidden = config.hidden();
                    info.isRemoved = config.removed();
                    info.allowMultiple = config.allowMultiple();
                    info.isPath = config.isPath();
                    info.isDisplayed = config.displayed();
                    info.isCompcOnly = config.compcOnly();
                    info.isRequired = config.isRequired();
                   
                    // Argument name generator class
                    final ArgumentNameGenerator argumentNameGeneratorClass =
                        method.getAnnotation(ArgumentNameGenerator.class);
                    if (argumentNameGeneratorClass != null)
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.