|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.ref.Reference<T>
java.lang.ref.WeakReference<Cleaner>
org.ow2.util.pool.impl.enhanced.internal.thread.impl.CleanerReferencer
public final class CleanerReferencer
Keep a reference on cleaner. If cleaner does not have anything to clean then we keep only a weak reference on cleaner. So if cleaner is not used anywhere else, the cleaner is garbage collected. It produce the end of the thread running this object. And normally this object should be also garbage collected. Warning : if you do not call add after creating a weak reference which use queue of cleaner, then the thread running keeper could be terminated whereas cleaner is not garbage collected. The cleaner will not continue to work but no error will occurs. This class is final because its constructor starts a thread on its instances.
| Constructor Summary | |
|---|---|
CleanerReferencer(Cleaner cleaner)
|
|
| Method Summary | |
|---|---|
void |
add()
|
void |
run()
|
| Methods inherited from class java.lang.ref.Reference |
|---|
clear, enqueue, get, isEnqueued |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CleanerReferencer(Cleaner cleaner)
| Method Detail |
|---|
public void run()
run in interface java.lang.Runnablepublic void add()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||