Package com.google.common.base
Class FinalizableReferenceQueue
- java.lang.Object
-
- com.google.common.base.FinalizableReferenceQueue
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class FinalizableReferenceQueue extends java.lang.Object implements java.io.Closeable
A reference queue with an associated background thread that dequeues references and invokesFinalizableReference.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)
-
-
Constructor Summary
Constructors Constructor Description FinalizableReferenceQueue()
Constructs a new queue.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
-