|
PooliT v2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ascentphase.poolit.poolers.DisposablePooler
This pooler acts as a memory-sensitive pool. It will pool objects as long as there is enough memory to do so. If the Java VM is low on memory and performs a garbage-collecting sweep, one or more or all objects in this pool may be garbage-collected to free up available memory for other parts of the application to use. This class is convenient to use if you create many objects of a specific type that can be re-used but should be disposed to free up memory if required.
| Field Summary | |
protected PoolHandler |
handler
|
| Constructor Summary | |
DisposablePooler(PoolHandler hnd)
Creates a new instance of DisposablePooler |
|
| Method Summary | |
void |
close()
Releases all objects in the pool and any resources held by these objects. |
java.lang.Object |
fetch()
Retrieves an object from the pool. |
void |
release(java.lang.Object o)
Returns an object to the pool. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected PoolHandler handler
| Constructor Detail |
public DisposablePooler(PoolHandler hnd)
| Method Detail |
public java.lang.Object fetch()
throws FetchException
fetch in interface PoolerFetchException - if the pooler is unable to return an object from
the pool.public void release(java.lang.Object o)
release in interface Poolero - the objectpublic void close()
Pooler
close in interface PoolerPooler.close()
|
PooliT v2.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||