Package org.apache.commons.pool.impl

Examples of org.apache.commons.pool.impl.GenericKeyedObjectPool$Evictor


            try
            {
                dispatcherFactory = new DispatcherPoolFactory();
                dispatcherPool = PoolUtils
                        .synchronizedPool(new GenericKeyedObjectPool(
                                dispatcherFactory, poolConfig));

                enumerateConsumers();

            }
View Full Code Here


        final List calledMethods = new ArrayList();
        final Object key = new Object();

        // Test that the minIdle check doesn't add too many idle objects
        final KeyedPoolableObjectFactory kpof = (KeyedPoolableObjectFactory)createProxy(KeyedPoolableObjectFactory.class, calledMethods);
        final KeyedObjectPool kop = new GenericKeyedObjectPool(kpof);
        PoolUtils.checkMinIdle(kop, key, 2, 100);
        Thread.sleep(400);
        assertEquals(2, kop.getNumIdle(key));
        assertEquals(2, kop.getNumIdle());
        kop.close();
        int makeObjectCount = 0;
        final Iterator iter = calledMethods.iterator();
        while (iter.hasNext()) {
            final String methodName = (String)iter.next();
            if ("makeObject".equals(methodName)) {
View Full Code Here

TOP

Related Classes of org.apache.commons.pool.impl.GenericKeyedObjectPool$Evictor

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.