|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.knowledgeplaza.util.pool.ApacheObjectPoolWrapper
public class ApacheObjectPoolWrapper
This is a wrapper of the Apache's ObjectPool 1.3: - getting rid of the "throws Exception" - implement a shutdown mode before close
| Field Summary | |
|---|---|
static String |
SOURCECODE_VERSION
Standard variable for determining version of a class file. |
| Constructor Summary | |
|---|---|
ApacheObjectPoolWrapper(org.apache.commons.pool.ObjectPool pool)
|
|
ApacheObjectPoolWrapper(String name,
org.apache.commons.pool.ObjectPool pool)
|
|
| Method Summary | |
|---|---|
void |
addObject()
|
Object |
borrowObject()
|
void |
clear()
|
void |
close()
|
String |
getName()
|
String |
getNameDescription()
|
int |
getNumActive()
|
int |
getNumIdle()
|
org.apache.commons.pool.ObjectPool |
getPool()
|
void |
invalidateObject(Object arg0)
|
static void |
main(String[] args)
Test |
void |
returnObject(Object arg0)
You may return a proxied object instead of the actual borrow object |
void |
setFactory(org.apache.commons.pool.PoolableObjectFactory arg0)
|
protected void |
setName(String value)
|
protected void |
setPool(org.apache.commons.pool.ObjectPool value)
|
void |
shutdown()
Shutdowns means about to close, but handed out objects can be returned and will be discarded immediately |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String SOURCECODE_VERSION
| Constructor Detail |
|---|
public ApacheObjectPoolWrapper(org.apache.commons.pool.ObjectPool pool)
public ApacheObjectPoolWrapper(String name,
org.apache.commons.pool.ObjectPool pool)
| Method Detail |
|---|
public org.apache.commons.pool.ObjectPool getPool()
protected void setPool(org.apache.commons.pool.ObjectPool value)
public String getName()
protected void setName(String value)
public String getNameDescription()
public Object borrowObject()
borrowObject in interface org.apache.commons.pool.ObjectPoolpublic void returnObject(Object arg0)
returnObject in interface org.apache.commons.pool.ObjectPoolpublic void invalidateObject(Object arg0)
invalidateObject in interface org.apache.commons.pool.ObjectPoolpublic void addObject()
addObject in interface org.apache.commons.pool.ObjectPool
public int getNumIdle()
throws UnsupportedOperationException
getNumIdle in interface org.apache.commons.pool.ObjectPoolUnsupportedOperationException
public int getNumActive()
throws UnsupportedOperationException
getNumActive in interface org.apache.commons.pool.ObjectPoolUnsupportedOperationException
public void clear()
throws UnsupportedOperationException
clear in interface org.apache.commons.pool.ObjectPoolUnsupportedOperationExceptionpublic void close()
close in interface org.apache.commons.pool.ObjectPool
public void setFactory(org.apache.commons.pool.PoolableObjectFactory arg0)
throws IllegalStateException,
UnsupportedOperationException
setFactory in interface org.apache.commons.pool.ObjectPoolIllegalStateException
UnsupportedOperationExceptionpublic void shutdown()
public static void main(String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||