Uses of Class
java.lang.ref.Reference
-
Packages that use Reference Package Description java.lang.ref Provides reference-object classes, which support a limited degree of interaction with the garbage collector. -
-
Uses of Reference in java.lang.ref
Subclasses of Reference in java.lang.ref Modifier and Type Class Description class
PhantomReference<T>
PhantomReference objects are used to detect referents which are no longer visible and are eligible to have their storage reclaimed.class
SoftReference<T>
SoftReference objects are used to detect referents which are no longer visible and who's memory is to be reclaimed.class
WeakReference<T>
WeakReference objects are used to detect referents which are no longer visible.Methods in java.lang.ref that return Reference Modifier and Type Method Description Reference<? extends T>
ReferenceQueue. poll()
Returns the next available reference from the queue if one is enqueued, null otherwise.Reference<? extends T>
ReferenceQueue. remove()
Return the next available enqueued reference on the queue, blocking indefinitely until one is available.Reference<? extends T>
ReferenceQueue. remove(long timeout)
Return the next available enqueued reference on the queue, blocking up to the time given until one is available.
-