|
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.NotifyPooler
Notifies objects when they are fetched from and released to the pool. This Pooler works by notifying objects in the pool that implement the NotifyPoolListener when the object leaves the pool and is returned to the pool. If the object does not implement NotifyPoolListener, nothing happens. This class wraps another Pooler that implements a specific pooling algorithm and permits notification of objects when leaving/entering the pool.
| Constructor Summary | |
NotifyPooler(Pooler p)
Creates a new instance of NotifyPooler |
|
| 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 and if the object implements the NotifyPoolListener interface, then it calls the objects fetched() method. |
void |
release(java.lang.Object o)
Returns an object to the pool and if the object implements the NotifyPoolListener interface, then it calls the objects released() method. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public NotifyPooler(Pooler p)
| 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 | |||||||||