Package org.apache.commons.pool.impl.GenericObjectPool

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


        startJedisEngine();
    }

    protected void startJedisEngine() {
        if (benchmarkMode) {
            jedisPool = new JedisPool(new Config(), "localhost",
                    Protocol.DEFAULT_PORT, 2000);
        } else {
            jedisPool = new JedisPool(new Config(), "localhost");
        }
        JOhm.setPool(jedisPool);
        purgeRedis();
    }
View Full Code Here

        }

        DefaultLdapConnectionFactory factory = new DefaultLdapConnectionFactory( config );
        factory.setTimeOut( createLdapConnectionPool.timeout() );

        Config poolConfig = new Config();
        poolConfig.lifo = createLdapConnectionPool.lifo();
        poolConfig.maxActive = createLdapConnectionPool.maxActive();
        poolConfig.maxIdle = createLdapConnectionPool.maxIdle();
        poolConfig.maxWait = createLdapConnectionPool.maxWait();
        poolConfig.minEvictableIdleTimeMillis = createLdapConnectionPool
View Full Code Here

    public JdbcCompiledQuery(JdbcDataContext dc, Query query) {
        super(query);
        _query = query;
        _sql = dc.getQueryRewriter().rewriteQuery(query);

        final Config config = new Config();
        config.maxActive = getSystemPropertyValue(JdbcDataContext.SYSTEM_PROPERTY_COMPILED_QUERY_POOL_MAX_SIZE, -1);
        config.minEvictableIdleTimeMillis = getSystemPropertyValue(
                JdbcDataContext.SYSTEM_PROPERTY_COMPILED_QUERY_POOL_MIN_EVICTABLE_IDLE_TIME_MILLIS, 500);
        config.timeBetweenEvictionRunsMillis = getSystemPropertyValue(
                JdbcDataContext.SYSTEM_PROPERTY_COMPILED_QUERY_POOL_TIME_BETWEEN_EVICTION_RUNS_MILLIS, 1000);
View Full Code Here

                        }
                    };
                }

                public Config getThreadPoolConfig() {
                    Config config = new Config();
                    config.maxActive = 10;
                    config.minIdle   = 2;
                    config.maxIdle   = 5;
                    config.testOnBorrow = false;
                    config.testOnReturn = true;
View Full Code Here

                        }
                    };
                }

                public Config getThreadPoolConfig() {
                    Config config = new Config();
                    config.maxActive = 10;
                    config.minIdle   = 2;
                    config.maxIdle   = 5;
                    config.testOnBorrow = false;
                    config.testOnReturn = true;
View Full Code Here

    public JedisPool(final Config poolConfig, final String host) {
        this(poolConfig, host, Protocol.DEFAULT_PORT, Protocol.DEFAULT_TIMEOUT, null, Protocol.DEFAULT_DATABASE);
    }

    public JedisPool(String host, int port) {
        this(new Config(), host, port, Protocol.DEFAULT_TIMEOUT, null, Protocol.DEFAULT_DATABASE);
    }
View Full Code Here

        if (minConnections > maxConnections) {
            throw new IllegalArgumentException("pool.minConnections > pool.maxConnections");
        }
        {// configure connection pool

            Config poolCfg = new Config();
            // pool upper limit
            poolCfg.maxActive = config.getMaxConnections().intValue();

            // minimum number of idle objects. MAKE SURE this is 0, otherwise the pool will start
            // trying to create connections permanently even if there's a connection failure,
View Full Code Here

        jedis.flushAll();
        jedis.quit();
        jedis.disconnect();
        List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
        shards.add(new JedisShardInfo("localhost"));
        Config config = new Config();
        config.maxActive = 100;
        config.maxIdle = 100;
        config.minIdle = 100;
        config.testOnBorrow = true;
        Seek.configure(config, shards);
View Full Code Here

        jedis.quit();
        jedis.disconnect();

        List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
        shards.add(new JedisShardInfo("localhost"));
        Config config = new Config();
        Seek.configure(config, shards);

        Seek seek = new Seek();

        for (int n = 0; n < SEARCHES; n++) {
View Full Code Here

TOP

Related Classes of org.apache.commons.pool.impl.GenericObjectPool.Config

Copyright © 2018 www.massapicom. 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.