com.jdon.controller.pool
类 CommonsPoolAdapter

java.lang.Object
  继承者 com.jdon.controller.pool.CommonsPoolAdapter
所有已实现的接口:
Pool

public class CommonsPoolAdapter
extends Object
implements Pool

ObjectPool pool = new StackObjectPool(new MyPoolableObjectFactory()); CommonsPoolAdapter cp = new CommonsPoolAdapter(pool); MyObject mo = (MyObject)cp.borrowObject(); .... cp.returnObject(mo);

@author banq


构造方法摘要
CommonsPoolAdapter(org.apache.commons.pool.impl.GenericObjectPool pool)
           
 
方法摘要
 Object acquirePoolable()
           
 int getMaxPoolSize()
           
 int getNumActive()
           
 int getNumIdle()
           
 void releasePoolable(Object object)
           
 void setMaxPoolSize(int maxPoolSize)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

CommonsPoolAdapter

public CommonsPoolAdapter(org.apache.commons.pool.impl.GenericObjectPool pool)
方法详细信息

setMaxPoolSize

public void setMaxPoolSize(int maxPoolSize)
指定者:
接口 Pool 中的 setMaxPoolSize

getMaxPoolSize

public int getMaxPoolSize()
指定者:
接口 Pool 中的 getMaxPoolSize

acquirePoolable

public Object acquirePoolable()
                       throws Exception
指定者:
接口 Pool 中的 acquirePoolable
抛出:
Exception

releasePoolable

public void releasePoolable(Object object)
                     throws Exception
指定者:
接口 Pool 中的 releasePoolable
抛出:
Exception

getNumActive

public int getNumActive()
指定者:
接口 Pool 中的 getNumActive

getNumIdle

public int getNumIdle()
指定者:
接口 Pool 中的 getNumIdle


Copyright © 2013. All Rights Reserved.