Package org.apache.commons.pool

Examples of org.apache.commons.pool.ObjectPool.invalidateObject()


            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
        ObjectPool pool = new StackObjectPool();
View Full Code Here


        if (useConnectionPool())
        {
            if ((client != null) && (client.isConnected()))
            {
                ObjectPool pool = getClientPool(endpoint);
                pool.invalidateObject(client);
            }
        }
    }

    protected synchronized ObjectPool getClientPool(ImmutableEndpoint endpoint)
View Full Code Here

            }
            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
View Full Code Here

            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
        ObjectPool pool = new StackObjectPool();
View Full Code Here

        });
        assertEquals("Wrong sequence", desiredSequence, testFactorySequenceStates);

        // check the order in which the factory is called when invalidating an object
        testFactorySequenceStates.clear();
        pool.invalidateObject(o);
        desiredSequence = Arrays.asList(new String[] {
                "destroyObject"
        });
        assertEquals("Wrong sequence", desiredSequence, testFactorySequenceStates);
    }
View Full Code Here

        });
        assertEquals("Wrong sequence", desiredSequence, testFactorySequenceStates);

        // check the order in which the factory is called when invalidating an object
        testFactorySequenceStates.clear();
        pool.invalidateObject(o);
        desiredSequence = Arrays.asList(new String[] {
                "destroyObject"
        });
        assertEquals("Wrong sequence", desiredSequence, testFactorySequenceStates);
    }
View Full Code Here

            }
            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
View Full Code Here

            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
        ObjectPool pool = new StackObjectPool();
View Full Code Here

            }
            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
View Full Code Here

            for(int i=0;i<10;i++) {
                pool.returnObject(borrowed[i]);
            }
        }
        pool.invalidateObject(pool.borrowObject());
        pool.invalidateObject(pool.borrowObject());
        pool.clear();       
    }
   
    public void testBorrowFromEmptyPoolWithNullFactory() throws Exception {
        ObjectPool pool = new StackObjectPool();
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.