Package org.apache.avalon.excalibur.pool

Examples of org.apache.avalon.excalibur.pool.SingleThreadedPool


    public void testSmallObjects()
        throws Exception
    {
        logger.info( "SMALL Sized Objects" );

        final SingleThreadedPool pool1 = new SingleThreadedPool( A.class, 5, 10 );
        final long pool1Start = System.currentTimeMillis();

        for( int i = 0; i < TEST_SIZE; i++ )
        {
            final Poolable a1 = pool1.get();
            pool1.put( a1 );
        }
        final long pool1End = System.currentTimeMillis();
        final long pool1Duration = pool1End - pool1Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool2 = new SingleThreadedPool( A.class, 5, 10 );
        final long pool2Start = System.currentTimeMillis();
        final int pool2Factor = 10;
        final int pool2Loops = TEST_SIZE / pool2Factor;
        for( int i = 0; i < pool2Loops; i++ )
        {
            final Poolable a1 = pool2.get();
            final Poolable a2 = pool2.get();
            final Poolable a3 = pool2.get();
            final Poolable a4 = pool2.get();
            final Poolable a5 = pool2.get();
            final Poolable a6 = pool2.get();
            final Poolable a7 = pool2.get();
            final Poolable a8 = pool2.get();
            final Poolable a9 = pool2.get();
            final Poolable a0 = pool2.get();
            pool2.put( a1 );
            pool2.put( a2 );
            pool2.put( a3 );
            pool2.put( a4 );
            pool2.put( a5 );
            pool2.put( a6 );
            pool2.put( a7 );
            pool2.put( a8 );
            pool2.put( a9 );
            pool2.put( a0 );
        }
        final long pool2End = System.currentTimeMillis();
        final long pool2Duration = pool2End - pool2Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool3 = new SingleThreadedPool( A.class, 5, 10 );
        final long pool3Start = System.currentTimeMillis();
        final int pool3Factor = 15;
        final int pool3Loops = TEST_SIZE / pool3Factor;
        for( int i = 0; i < pool3Loops; i++ )
        {
            final Poolable a1 = pool3.get();
            final Poolable a2 = pool3.get();
            final Poolable a3 = pool3.get();
            final Poolable a4 = pool3.get();
            final Poolable a5 = pool3.get();
            final Poolable a6 = pool3.get();
            final Poolable a7 = pool3.get();
            final Poolable a8 = pool3.get();
            final Poolable a9 = pool3.get();
            final Poolable a10 = pool3.get();
            final Poolable a11 = pool3.get();
            final Poolable a12 = pool3.get();
            final Poolable a13 = pool3.get();
            final Poolable a14 = pool3.get();
            final Poolable a15 = pool3.get();
            pool3.put( a1 );
            pool3.put( a2 );
            pool3.put( a3 );
            pool3.put( a4 );
            pool3.put( a5 );
            pool3.put( a6 );
            pool3.put( a7 );
            pool3.put( a8 );
            pool3.put( a9 );
            pool3.put( a10 );
            pool3.put( a11 );
            pool3.put( a12 );
            pool3.put( a13 );
            pool3.put( a14 );
            pool3.put( a15 );
        }
        final long pool3End = System.currentTimeMillis();
        final long pool3Duration = pool3End - pool3Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool4 = new SingleThreadedPool( A.class, 5, 10 );
        final long pool4Start = System.currentTimeMillis();
        final int pool4Factor = 20;
        final int pool4Loops = TEST_SIZE / pool4Factor;
        for( int i = 0; i < pool4Loops; i++ )
        {
            final Poolable a1 = pool4.get();
            final Poolable a2 = pool4.get();
            final Poolable a3 = pool4.get();
            final Poolable a4 = pool4.get();
            final Poolable a5 = pool4.get();
            final Poolable a6 = pool4.get();
            final Poolable a7 = pool4.get();
            final Poolable a8 = pool4.get();
            final Poolable a9 = pool4.get();
            final Poolable a10 = pool4.get();
            final Poolable a11 = pool4.get();
            final Poolable a12 = pool4.get();
            final Poolable a13 = pool4.get();
            final Poolable a14 = pool4.get();
            final Poolable a15 = pool4.get();
            final Poolable a16 = pool4.get();
            final Poolable a17 = pool4.get();
            final Poolable a18 = pool4.get();
            final Poolable a19 = pool4.get();
            final Poolable a20 = pool4.get();
            pool4.put( a1 );
            pool4.put( a2 );
            pool4.put( a3 );
            pool4.put( a4 );
            pool4.put( a5 );
            pool4.put( a6 );
            pool4.put( a7 );
            pool4.put( a8 );
            pool4.put( a9 );
            pool4.put( a10 );
            pool4.put( a11 );
            pool4.put( a12 );
            pool4.put( a13 );
            pool4.put( a14 );
            pool4.put( a15 );
            pool4.put( a16 );
            pool4.put( a17 );
            pool4.put( a18 );
            pool4.put( a19 );
            pool4.put( a20 );
        }
        final long pool4End = System.currentTimeMillis();
        final long pool4Duration = pool4End - pool4Start;

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 4: " + Runtime.getRuntime().freeMemory() );
View Full Code Here


        boolean maxStrict = false;
        boolean blocking = false;
        long blockTimeout = 0;
        long trimInterval = 0;

        SingleThreadedPool poolA = new SingleThreadedPool( factory, min, max );
        poolA.enableLogging( m_poolLogger );
        poolA.initialize();

        ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
        poolB.enableLogging( m_poolLogger );

        generalTest( name, poolA, poolB, 10, factory );
View Full Code Here

        boolean maxStrict = false;
        boolean blocking = false;
        long blockTimeout = 0;
        long trimInterval = 0;

        SingleThreadedPool poolA = new SingleThreadedPool( factory, min, max );
        poolA.enableLogging( m_poolLogger );
        poolA.initialize();

        ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
        poolB.enableLogging( m_poolLogger );

        generalTest( name, poolA, poolB, 20, factory );
View Full Code Here

        boolean maxStrict = false;
        boolean blocking = false;
        long blockTimeout = 0;
        long trimInterval = 0;

        SingleThreadedPool poolA = new SingleThreadedPool( factory, min, max );
        poolA.enableLogging( m_poolLogger );
        poolA.initialize();

        ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
        poolB.enableLogging( m_poolLogger );

        generalTest( name, poolA, poolB, 10, factory );
View Full Code Here

        boolean maxStrict = false;
        boolean blocking = false;
        long blockTimeout = 0;
        long trimInterval = 0;

        SingleThreadedPool poolA = new SingleThreadedPool( factory, min, max );
        poolA.enableLogging( m_poolLogger );
        poolA.initialize();

        ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
        poolB.enableLogging( m_poolLogger );

        generalTest( name, poolA, poolB, 20, factory );
View Full Code Here

        boolean maxStrict = false;
        boolean blocking = false;
        long blockTimeout = 0;
        long trimInterval = 0;

        SingleThreadedPool poolA = new SingleThreadedPool( factory, min, max );
        poolA.enableLogging( m_poolLogger );
        poolA.initialize();

        ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
        poolB.enableLogging( m_poolLogger );

        generalTest( name, poolA, poolB, 10, factory );
View Full Code Here

        boolean maxStrict = false;
        boolean blocking = false;
        long blockTimeout = 0;
        long trimInterval = 0;

        SingleThreadedPool poolA = new SingleThreadedPool( factory, min, max );
        poolA.enableLogging( m_poolLogger );
        poolA.initialize();

        ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
        poolB.enableLogging( m_poolLogger );

        generalTest( name, poolA, poolB, 20, factory );
View Full Code Here

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        final SingleThreadedPool pool1 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool1Start = System.currentTimeMillis();

        for( int i = 0; i < TEST_SIZE; i++ )
        {
            final Poolable a1 = pool1.get();
            pool1.put( a1 );
        }
        final long pool1End = System.currentTimeMillis();
        final long pool1Duration = pool1End - pool1Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool2 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool2Start = System.currentTimeMillis();
        final int pool2Factor = 10;
        final int pool2Loops = TEST_SIZE / pool2Factor;

        for( int i = 0; i < pool2Loops; i++ )
        {
            final Poolable a1 = pool2.get();
            final Poolable a2 = pool2.get();
            final Poolable a3 = pool2.get();
            final Poolable a4 = pool2.get();
            final Poolable a5 = pool2.get();
            final Poolable a6 = pool2.get();
            final Poolable a7 = pool2.get();
            final Poolable a8 = pool2.get();
            final Poolable a9 = pool2.get();
            final Poolable a10 = pool2.get();
            pool2.put( a1 );
            pool2.put( a2 );
            pool2.put( a3 );
            pool2.put( a4 );
            pool2.put( a5 );
            pool2.put( a6 );
            pool2.put( a7 );
            pool2.put( a8 );
            pool2.put( a9 );
            pool2.put( a10 );
        }
        final long pool2End = System.currentTimeMillis();
        final long pool2Duration = pool2End - pool2Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool3 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool3Start = System.currentTimeMillis();
        final int pool3Factor = 15;
        final int pool3Loops = TEST_SIZE / pool3Factor;

        for( int i = 0; i < pool3Loops; i++ )
        {
            final Poolable a1 = pool3.get();
            final Poolable a2 = pool3.get();
            final Poolable a3 = pool3.get();
            final Poolable a4 = pool3.get();
            final Poolable a5 = pool3.get();
            final Poolable a6 = pool3.get();
            final Poolable a7 = pool3.get();
            final Poolable a8 = pool3.get();
            final Poolable a9 = pool3.get();
            final Poolable a10 = pool3.get();
            final Poolable a11 = pool3.get();
            final Poolable a12 = pool3.get();
            final Poolable a13 = pool3.get();
            final Poolable a14 = pool3.get();
            final Poolable a15 = pool3.get();
            pool3.put( a1 );
            pool3.put( a2 );
            pool3.put( a3 );
            pool3.put( a4 );
            pool3.put( a5 );
            pool3.put( a6 );
            pool3.put( a7 );
            pool3.put( a8 );
            pool3.put( a9 );
            pool3.put( a10 );
            pool3.put( a11 );
            pool3.put( a12 );
            pool3.put( a13 );
            pool3.put( a14 );
            pool3.put( a15 );
        }
        final long pool3End = System.currentTimeMillis();
        final long pool3Duration = pool3End - pool3Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool4 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool4Start = System.currentTimeMillis();
        final int pool4Factor = 20;
        final int pool4Loops = TEST_SIZE / pool4Factor;

        for( int i = 0; i < pool4Loops; i++ )
        {
            final Poolable a1 = pool4.get();
            final Poolable a2 = pool4.get();
            final Poolable a3 = pool4.get();
            final Poolable a4 = pool4.get();
            final Poolable a5 = pool4.get();
            final Poolable a6 = pool4.get();
            final Poolable a7 = pool4.get();
            final Poolable a8 = pool4.get();
            final Poolable a9 = pool4.get();
            final Poolable a10 = pool4.get();
            final Poolable a11 = pool4.get();
            final Poolable a12 = pool4.get();
            final Poolable a13 = pool4.get();
            final Poolable a14 = pool4.get();
            final Poolable a15 = pool4.get();
            final Poolable a16 = pool4.get();
            final Poolable a17 = pool4.get();
            final Poolable a18 = pool4.get();
            final Poolable a19 = pool4.get();
            final Poolable a20 = pool4.get();
            pool4.put( a1 );
            pool4.put( a2 );
            pool4.put( a3 );
            pool4.put( a4 );
            pool4.put( a5 );
            pool4.put( a6 );
            pool4.put( a7 );
            pool4.put( a8 );
            pool4.put( a9 );
            pool4.put( a10 );
            pool4.put( a11 );
            pool4.put( a12 );
            pool4.put( a13 );
            pool4.put( a14 );
            pool4.put( a15 );
            pool4.put( a16 );
            pool4.put( a17 );
            pool4.put( a18 );
            pool4.put( a19 );
            pool4.put( a20 );
        }
        final long pool4End = System.currentTimeMillis();
        final long pool4Duration = pool4End - pool4Start;

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 4: " + Runtime.getRuntime().freeMemory() );
View Full Code Here

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        final SingleThreadedPool pool1 = new SingleThreadedPool( C.class, 5, 10 );
        final long pool1Start = System.currentTimeMillis();

        for( int i = 0; i < TEST_SIZE; i++ )
        {
            final Poolable a1 = pool1.get();
            pool1.put( a1 );
        }
        final long pool1End = System.currentTimeMillis();
        final long pool1Duration = pool1End - pool1Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool2 = new SingleThreadedPool( C.class, 5, 10 );
        final long pool2Start = System.currentTimeMillis();
        final int pool2Factor = 10;
        final int pool2Loops = TEST_SIZE / pool2Factor;
        for( int i = 0; i < pool2Loops; i++ )
        {
            final Poolable a1 = pool2.get();
            final Poolable a2 = pool2.get();
            final Poolable a3 = pool2.get();
            final Poolable a4 = pool2.get();
            final Poolable a5 = pool2.get();
            final Poolable a6 = pool2.get();
            final Poolable a7 = pool2.get();
            final Poolable a8 = pool2.get();
            final Poolable a9 = pool2.get();
            final Poolable a10 = pool2.get();
            pool2.put( a1 );
            pool2.put( a2 );
            pool2.put( a3 );
            pool2.put( a4 );
            pool2.put( a5 );
            pool2.put( a6 );
            pool2.put( a7 );
            pool2.put( a8 );
            pool2.put( a9 );
            pool2.put( a10 );
        }
        final long pool2End = System.currentTimeMillis();
        final long pool2Duration = pool2End - pool2Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool3 = new SingleThreadedPool( C.class, 5, 10 );
        final long pool3Start = System.currentTimeMillis();
        final int pool3Factor = 15;
        final int pool3Loops = TEST_SIZE / pool3Factor;
        for( int i = 0; i < pool3Loops; i++ )
        {
            final Poolable a1 = pool3.get();
            final Poolable a2 = pool3.get();
            final Poolable a3 = pool3.get();
            final Poolable a4 = pool3.get();
            final Poolable a5 = pool3.get();
            final Poolable a6 = pool3.get();
            final Poolable a7 = pool3.get();
            final Poolable a8 = pool3.get();
            final Poolable a9 = pool3.get();
            final Poolable a10 = pool3.get();
            final Poolable a11 = pool3.get();
            final Poolable a12 = pool3.get();
            final Poolable a13 = pool3.get();
            final Poolable a14 = pool3.get();
            final Poolable a15 = pool3.get();
            pool3.put( a1 );
            pool3.put( a2 );
            pool3.put( a3 );
            pool3.put( a4 );
            pool3.put( a5 );
            pool3.put( a6 );
            pool3.put( a7 );
            pool3.put( a8 );
            pool3.put( a9 );
            pool3.put( a10 );
            pool3.put( a11 );
            pool3.put( a12 );
            pool3.put( a13 );
            pool3.put( a14 );
            pool3.put( a15 );
        }
        final long pool3End = System.currentTimeMillis();
        final long pool3Duration = pool3End - pool3Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool4 = new SingleThreadedPool( C.class, 5, 10 );
        final long pool4Start = System.currentTimeMillis();
        final int pool4Factor = 20;
        final int pool4Loops = TEST_SIZE / pool4Factor;

        for( int i = 0; i < pool4Loops; i++ )
        {
            final Poolable a1 = pool4.get();
            final Poolable a2 = pool4.get();
            final Poolable a3 = pool4.get();
            final Poolable a4 = pool4.get();
            final Poolable a5 = pool4.get();
            final Poolable a6 = pool4.get();
            final Poolable a7 = pool4.get();
            final Poolable a8 = pool4.get();
            final Poolable a9 = pool4.get();
            final Poolable a10 = pool4.get();
            final Poolable a11 = pool4.get();
            final Poolable a12 = pool4.get();
            final Poolable a13 = pool4.get();
            final Poolable a14 = pool4.get();
            final Poolable a15 = pool4.get();
            final Poolable a16 = pool4.get();
            final Poolable a17 = pool4.get();
            final Poolable a18 = pool4.get();
            final Poolable a19 = pool4.get();
            final Poolable a20 = pool4.get();
            pool4.put( a1 );
            pool4.put( a2 );
            pool4.put( a3 );
            pool4.put( a4 );
            pool4.put( a5 );
            pool4.put( a6 );
            pool4.put( a7 );
            pool4.put( a8 );
            pool4.put( a9 );
            pool4.put( a10 );
            pool4.put( a11 );
            pool4.put( a12 );
            pool4.put( a13 );
            pool4.put( a14 );
            pool4.put( a15 );
            pool4.put( a16 );
            pool4.put( a17 );
            pool4.put( a18 );
            pool4.put( a19 );
            pool4.put( a20 );
        }
        final long pool4End = System.currentTimeMillis();
        final long pool4Duration = pool4End - pool4Start;

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 4: " + Runtime.getRuntime().freeMemory() );
View Full Code Here

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        final SingleThreadedPool pool1 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool1Start = System.currentTimeMillis();

        for( int i = 0; i < TEST_SIZE; i++ )
        {
            final Poolable a1 = pool1.get();
            pool1.put( a1 );
        }
        final long pool1End = System.currentTimeMillis();
        final long pool1Duration = pool1End - pool1Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 1: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool2 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool2Start = System.currentTimeMillis();
        final int pool2Factor = 10;
        final int pool2Loops = TEST_SIZE / pool2Factor;

        for( int i = 0; i < pool2Loops; i++ )
        {
            final Poolable a1 = pool2.get();
            final Poolable a2 = pool2.get();
            final Poolable a3 = pool2.get();
            final Poolable a4 = pool2.get();
            final Poolable a5 = pool2.get();
            final Poolable a6 = pool2.get();
            final Poolable a7 = pool2.get();
            final Poolable a8 = pool2.get();
            final Poolable a9 = pool2.get();
            final Poolable a10 = pool2.get();
            pool2.put( a1 );
            pool2.put( a2 );
            pool2.put( a3 );
            pool2.put( a4 );
            pool2.put( a5 );
            pool2.put( a6 );
            pool2.put( a7 );
            pool2.put( a8 );
            pool2.put( a9 );
            pool2.put( a10 );
        }
        final long pool2End = System.currentTimeMillis();
        final long pool2Duration = pool2End - pool2Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 2: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool3 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool3Start = System.currentTimeMillis();
        final int pool3Factor = 15;
        final int pool3Loops = TEST_SIZE / pool3Factor;

        for( int i = 0; i < pool3Loops; i++ )
        {
            final Poolable a1 = pool3.get();
            final Poolable a2 = pool3.get();
            final Poolable a3 = pool3.get();
            final Poolable a4 = pool3.get();
            final Poolable a5 = pool3.get();
            final Poolable a6 = pool3.get();
            final Poolable a7 = pool3.get();
            final Poolable a8 = pool3.get();
            final Poolable a9 = pool3.get();
            final Poolable a10 = pool3.get();
            final Poolable a11 = pool3.get();
            final Poolable a12 = pool3.get();
            final Poolable a13 = pool3.get();
            final Poolable a14 = pool3.get();
            final Poolable a15 = pool3.get();
            pool3.put( a1 );
            pool3.put( a2 );
            pool3.put( a3 );
            pool3.put( a4 );
            pool3.put( a5 );
            pool3.put( a6 );
            pool3.put( a7 );
            pool3.put( a8 );
            pool3.put( a9 );
            pool3.put( a10 );
            pool3.put( a11 );
            pool3.put( a12 );
            pool3.put( a13 );
            pool3.put( a14 );
            pool3.put( a15 );
        }
        final long pool3End = System.currentTimeMillis();
        final long pool3Duration = pool3End - pool3Start;

        System.gc();
        System.gc();
        Thread.sleep( 2 );

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 3: " + Runtime.getRuntime().freeMemory() );

        final SingleThreadedPool pool4 = new SingleThreadedPool( B.class, 5, 10 );
        final long pool4Start = System.currentTimeMillis();
        final int pool4Factor = 20;
        final int pool4Loops = TEST_SIZE / pool4Factor;

        for( int i = 0; i < pool4Loops; i++ )
        {
            final Poolable a1 = pool4.get();
            final Poolable a2 = pool4.get();
            final Poolable a3 = pool4.get();
            final Poolable a4 = pool4.get();
            final Poolable a5 = pool4.get();
            final Poolable a6 = pool4.get();
            final Poolable a7 = pool4.get();
            final Poolable a8 = pool4.get();
            final Poolable a9 = pool4.get();
            final Poolable a10 = pool4.get();
            final Poolable a11 = pool4.get();
            final Poolable a12 = pool4.get();
            final Poolable a13 = pool4.get();
            final Poolable a14 = pool4.get();
            final Poolable a15 = pool4.get();
            final Poolable a16 = pool4.get();
            final Poolable a17 = pool4.get();
            final Poolable a18 = pool4.get();
            final Poolable a19 = pool4.get();
            final Poolable a20 = pool4.get();
            pool4.put( a1 );
            pool4.put( a2 );
            pool4.put( a3 );
            pool4.put( a4 );
            pool4.put( a5 );
            pool4.put( a6 );
            pool4.put( a7 );
            pool4.put( a8 );
            pool4.put( a9 );
            pool4.put( a10 );
            pool4.put( a11 );
            pool4.put( a12 );
            pool4.put( a13 );
            pool4.put( a14 );
            pool4.put( a15 );
            pool4.put( a16 );
            pool4.put( a17 );
            pool4.put( a18 );
            pool4.put( a19 );
            pool4.put( a20 );
        }
        final long pool4End = System.currentTimeMillis();
        final long pool4Duration = pool4End - pool4Start;

        if( logger.isDebugEnabled() ) logger.debug( "FreeMem post 4: " + Runtime.getRuntime().freeMemory() );
View Full Code Here

TOP

Related Classes of org.apache.avalon.excalibur.pool.SingleThreadedPool

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.