edu.mit.ai.psg.utilities
Class ReferenceCleaner
java.lang.Object
|
+--edu.mit.ai.psg.utilities.ReferenceCleaner
- public class ReferenceCleaner
- extends Object
ReferenceCleaner is used to remove entries from collections
which use soft or weak references. To use, simply register
reference with this ReferenceCleaner.queue, e.g., by supplying
this queue as an argument to the reference constructor.
The reference should implement ReferenceCleaner.Cleanable,
and its ReferenceCleaner.Cleanable.cleanUp() method
will be called, e.g., to remove the reference from a collection or map.
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
referenceQueue
public static final ReferenceQueue referenceQueue
- reference queue for notifying thread when value is unreachable
ReferenceCleaner
public ReferenceCleaner()