|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Type - -
the type of the pooled objectspublic interface Pool<Type>
Basic interface to be implemented by ObjectPool implementations. Pools should
provide a constructor with a
PoolObjectFactory as a mandatory
parameter to create and destory the pooled objects.
PoolObjectFactory| Method Summary | |
|---|---|
Type |
aquire()
Return an object from the pool or create one if the pool is empty. |
void |
destroy()
releases all pooled objects using PoolObjectFactory.destroyInstance(Object) method. |
boolean |
expires()
|
long |
getExpireTime()
|
int |
getSize()
|
void |
release(Type type)
Adds a previously aquired object to the pool. |
| Method Detail |
|---|
Type aquire()
void release(Type type)
PoolObjectFactory.destroyInstance(Object) method.
type - -
the previously aquired objectint getSize()
long getExpireTime()
boolean expires()
true if and only if the pool uses an expire
mechanismn, otherwith falsevoid destroy()
PoolObjectFactory.destroyInstance(Object) method. The pool can not
be reused after this method has been called
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||