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.


Inner Class Summary
static interface ReferenceCleaner.Cleanable
           
 
Field Summary
static ReferenceQueue referenceQueue
          reference queue for notifying thread when value is unreachable
 
Constructor Summary
ReferenceCleaner()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

referenceQueue

public static final ReferenceQueue referenceQueue
reference queue for notifying thread when value is unreachable
Constructor Detail

ReferenceCleaner

public ReferenceCleaner()

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu