Examples of StackObjectPool


Examples of org.apache.commons.pool.impl.StackObjectPool

    public MethodResultCache(GroupCacheAccess cache)
        throws TorqueException
    {
        this.jcsCache = cache;
        groups = new HashMap();
        pool = new StackObjectPool(new MethodCacheKey.Factory(), 10000);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

    public MethodResultCache(GroupCacheAccess cache)
        throws TorqueException
    {
        this.jcsCache = cache;
        groups = new HashMap();
        pool = new StackObjectPool(new MethodCacheKey.Factory(), 10000);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

    public MethodResultCache(GroupCacheAccess cache)
        throws TorqueException
    {
        this.jcsCache = cache;
        groups = new HashMap();
        pool = new StackObjectPool(new MethodCacheKey.Factory(), 10000);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

  public ConnectionPoolDataSource(DataSource underlyingDataSource) {
    if (underlyingDataSource == null) {
      throw new IllegalArgumentException("underlyingDataSource is null");
    }
    PoolableObjectFactory poolFactory = new DataSourceConnectionFactory(underlyingDataSource);
    ObjectPool connectionPool = new StackObjectPool(poolFactory);
    this.delegate = new PoolingDataSource(connectionPool);
  }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

    public MethodResultCache(GroupCacheAccess cache)
        throws TorqueException
    {
        this.jcsCache = cache;
        groups = new HashMap();
        pool = new StackObjectPool(new MethodCacheKey.Factory(), 10000);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

    public MethodResultCache(GroupCacheAccess cache)
        throws TorqueException
    {
        this.jcsCache = cache;
        groups = new HashMap();
        pool = new StackObjectPool(new MethodCacheKey.Factory(), 10000);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

     */
    public void testMakeFactoryNoArguments() throws Exception {
        TypedPoolableObjectFactory<MockObject> factory = TypedPoolableObjectFactory.makeFactory(MockObject.class, true);
        assertNotNull(factory);
       
        StackObjectPool pool = new StackObjectPool(factory);
       
        MockObject obj = (MockObject)pool.borrowObject();
        assertNotNull(obj);
        assertTrue(obj.isInitialized());
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

        Integer expected0 = 12345;
        String expected1 = "ABC";
        TypedPoolableObjectFactory<MockObjectWithArgs> factory = TypedPoolableObjectFactory.makeFactory(MockObjectWithArgs.class, true, expected0, expected1);
        assertNotNull(factory);
       
        StackObjectPool pool = new StackObjectPool(factory);
       
        MockObjectWithArgs obj = (MockObjectWithArgs)pool.borrowObject();
        assertNotNull(obj);
        assertTrue(obj.isInitialized());
        assertEquals(expected0, obj.value0);
        assertEquals(expected1, obj.value1);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

    public MethodResultCache(GroupCacheAccess cache)
        throws TorqueException
    {
        this.jcsCache = cache;
        groups = new HashMap();
        pool = new StackObjectPool(new MethodCacheKey.Factory(), 10000);
    }
View Full Code Here

Examples of org.apache.commons.pool.impl.StackObjectPool

     */
    public void init(String invokerClass, int invokerPoolSize)
    {
        this.invokerClass = invokerClass;
        this.invokerPoolSize = invokerPoolSize;
        pool = new StackObjectPool(this, invokerPoolSize);       
    }
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.