| 
QuickServer v1.4.5  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.quickserver.util.pool.BasicObjectPool
This class will maintain a simple pool of object instances.
 It internally used a HashSet
| Nested Class Summary | |
static class | 
BasicObjectPool.Config
 | 
| Constructor Summary | |
BasicObjectPool()
 | 
|
BasicObjectPool(org.apache.commons.pool.PoolableObjectFactory factory,
                BasicObjectPool.Config config)
 | 
|
| Method Summary | |
 void | 
addObject()
 | 
 java.lang.Object | 
borrowObject()
 | 
 void | 
clear()
Clears any objects sitting idle in the pool  | 
 void | 
close()
Close this pool, and free any resources associated with it.  | 
 java.util.Iterator | 
getAllActiveObjects()
Returns the iterator of all active objects  | 
 int | 
getNumActive()
Return the number of instances currently borrowed from my pool  | 
 int | 
getNumIdle()
Return the number of instances currently idle in my pool  | 
 java.lang.Object | 
getObjectToSynchronize()
 | 
 void | 
invalidateObject(java.lang.Object obj)
Invalidates an object from the pool  | 
 void | 
returnObject(java.lang.Object obj)
Return an instance to my pool  | 
 void | 
setFactory(org.apache.commons.pool.PoolableObjectFactory factory)
Sets the factory I use to create new instances  | 
| Methods inherited from class java.lang.Object | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
public BasicObjectPool()
public BasicObjectPool(org.apache.commons.pool.PoolableObjectFactory factory,
                       BasicObjectPool.Config config)
| Method Detail | 
public void addObject()
               throws java.lang.Exception
addObject in interface org.apache.commons.pool.ObjectPooljava.lang.Exception
public java.lang.Object borrowObject()
                              throws java.lang.Exception
borrowObject in interface org.apache.commons.pool.ObjectPooljava.lang.Exceptionpublic void clear()
clear in interface org.apache.commons.pool.ObjectPool
public void close()
           throws java.lang.Exception
close in interface org.apache.commons.pool.ObjectPooljava.lang.Exceptionpublic int getNumActive()
getNumActive in interface org.apache.commons.pool.ObjectPoolpublic int getNumIdle()
getNumIdle in interface org.apache.commons.pool.ObjectPool
public void invalidateObject(java.lang.Object obj)
                      throws java.lang.Exception
invalidateObject in interface org.apache.commons.pool.ObjectPooljava.lang.Exception
public void returnObject(java.lang.Object obj)
                  throws java.lang.Exception
returnObject in interface org.apache.commons.pool.ObjectPooljava.lang.Exceptionpublic void setFactory(org.apache.commons.pool.PoolableObjectFactory factory)
setFactory in interface org.apache.commons.pool.ObjectPoolpublic java.util.Iterator getAllActiveObjects()
getAllActiveObjects in interface QSObjectPoolpublic java.lang.Object getObjectToSynchronize()
getObjectToSynchronize in interface QSObjectPool
  | 
QuickServer v1.4.5  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||