QuickServer
v1.4.7

org.quickserver.util.pool
Class MakeQSObjectPool

java.lang.Object
  extended byorg.quickserver.util.pool.MakeQSObjectPool
All Implemented Interfaces:
org.apache.commons.pool.ObjectPool, QSObjectPool, QSObjectPoolMaker

public class MakeQSObjectPool
extends java.lang.Object
implements QSObjectPool, QSObjectPoolMaker

This class that creates QSObjectPool from ObjectPool passed to it.

Since:
1.4.5

Field Summary
protected  java.util.List list
           
protected  org.apache.commons.pool.ObjectPool objectPool
           
 
Constructor Summary
MakeQSObjectPool()
           
MakeQSObjectPool(org.apache.commons.pool.ObjectPool objectPool)
           
 
Method Summary
 void addObject()
           
 java.lang.Object borrowObject()
           
 void clear()
           
 void close()
           
 java.util.Iterator getAllActiveObjects()
          Returns the iterator of all active objects
 int getNumActive()
           
 int getNumIdle()
           
 java.lang.Object getObjectToSynchronize()
           
 QSObjectPool getQSObjectPool(org.apache.commons.pool.ObjectPool objectPool)
           
 void invalidateObject(java.lang.Object obj)
           
 void returnObject(java.lang.Object obj)
           
 void setFactory(org.apache.commons.pool.PoolableObjectFactory factory)
           
protected  void setObjectPool(org.apache.commons.pool.ObjectPool objectPool)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

objectPool

protected org.apache.commons.pool.ObjectPool objectPool

list

protected java.util.List list
Constructor Detail

MakeQSObjectPool

public MakeQSObjectPool()

MakeQSObjectPool

public MakeQSObjectPool(org.apache.commons.pool.ObjectPool objectPool)
Method Detail

getQSObjectPool

public QSObjectPool getQSObjectPool(org.apache.commons.pool.ObjectPool objectPool)
Specified by:
getQSObjectPool in interface QSObjectPoolMaker

setObjectPool

protected void setObjectPool(org.apache.commons.pool.ObjectPool objectPool)

returnObject

public void returnObject(java.lang.Object obj)
                  throws java.lang.Exception
Specified by:
returnObject in interface org.apache.commons.pool.ObjectPool
Throws:
java.lang.Exception

borrowObject

public java.lang.Object borrowObject()
                              throws java.lang.Exception
Specified by:
borrowObject in interface org.apache.commons.pool.ObjectPool
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Specified by:
close in interface org.apache.commons.pool.ObjectPool
Throws:
java.lang.Exception

getAllActiveObjects

public java.util.Iterator getAllActiveObjects()
Returns the iterator of all active objects

Specified by:
getAllActiveObjects in interface QSObjectPool

getObjectToSynchronize

public java.lang.Object getObjectToSynchronize()
Specified by:
getObjectToSynchronize in interface QSObjectPool

addObject

public void addObject()
               throws java.lang.Exception
Specified by:
addObject in interface org.apache.commons.pool.ObjectPool
Throws:
java.lang.Exception

clear

public void clear()
           throws java.lang.Exception
Specified by:
clear in interface org.apache.commons.pool.ObjectPool
Throws:
java.lang.Exception

getNumActive

public int getNumActive()
Specified by:
getNumActive in interface org.apache.commons.pool.ObjectPool

getNumIdle

public int getNumIdle()
Specified by:
getNumIdle in interface org.apache.commons.pool.ObjectPool

invalidateObject

public void invalidateObject(java.lang.Object obj)
                      throws java.lang.Exception
Specified by:
invalidateObject in interface org.apache.commons.pool.ObjectPool
Throws:
java.lang.Exception

setFactory

public void setFactory(org.apache.commons.pool.PoolableObjectFactory factory)
Specified by:
setFactory in interface org.apache.commons.pool.ObjectPool

QuickServer
v1.4.7

Copyright © 2003-2006 QuickServer.org