|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnf.fr.eraasoft.pool.impl.AbstractPool<T>
T - public abstract class AbstractPool<T>
Object pool implementation based on LinkedBlockingQueue
Use PoolSettings class to obtain an instance of this class
PoolSettings| Constructor Summary | |
|---|---|
AbstractPool(PoolableObject<T> poolableObject,
PoolSettings<T> settings)
|
|
| Method Summary | |
|---|---|
int |
actives()
|
void |
clear()
Clear the object pool |
protected void |
create()
|
void |
destroy()
Destroy the pool |
int |
idles()
|
protected void |
init()
|
void |
remove(int nbObjects)
remove idle objects |
void |
returnObj(T t)
Return object to the pool |
java.lang.String |
toString()
|
void |
validateIdles()
validate idle objects |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface nf.fr.eraasoft.pool.ObjectPool |
|---|
getObj |
| Constructor Detail |
|---|
public AbstractPool(PoolableObject<T> poolableObject,
PoolSettings<T> settings)
| Method Detail |
|---|
protected void init()
throws PoolException
PoolException
protected void create()
throws PoolException
PoolExceptionpublic void returnObj(T t)
ObjectPool
returnObj in interface ObjectPool<T>public int idles()
idles in interface Controlablepublic void remove(int nbObjects)
Controlable
remove in interface ControlablenbObjects - number of idle objects to removepublic void clear()
Controlable
clear in interface Controlablepublic void destroy()
Controlable
destroy in interface Controlablepublic int actives()
actives in interface Controlablepublic java.lang.String toString()
toString in class java.lang.Objectpublic void validateIdles()
Controlable
validateIdles in interface Controlable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||