com.google.common.base
Class FinalizableReferenceQueue

java.lang.Object
  extended by com.google.common.base.FinalizableReferenceQueue

public class FinalizableReferenceQueue
extends Object

A reference queue with an associated background thread that dequeues references and invokes FinalizableReference.finalizeReferent() on them.

Keep a strong reference to this object until all of the associated referents have been finalized. If this object is garbage collected earlier, the backing thread will not invoke finalizeReferent() on the remaining references.

Since:
2.0 (imported from Google Collections Library)
Author:
Bob Lee

Constructor Summary
FinalizableReferenceQueue()
          Deprecated. FinalizableReferenceQueue is an unsound mechanism for cleaning up references, because (1) it's single thread can be easily overloaded, and (2) it's insistance on running a background thread is problematic in certain environments. This class is scheduled for deletion in December 2012.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalizableReferenceQueue

@Deprecated
public FinalizableReferenceQueue()
Deprecated. FinalizableReferenceQueue is an unsound mechanism for cleaning up references, because (1) it's single thread can be easily overloaded, and (2) it's insistance on running a background thread is problematic in certain environments. This class is scheduled for deletion in December 2012.

Constructs a new queue.



Copyright © 2010-2011. All Rights Reserved.