Top Description Constructors Methods
com.google.common.base

public abstract Class FinalizableSoftReference<T>

extends SoftReference<T>
implements FinalizableReference
Class Inheritance
All Implemented Interfaces
com.google.common.base.FinalizableReference
Annotations
@J2ktIncompatible
@GwtIncompatible
@ElementTypesAreNonnullByDefault
Imports
com.google.common.annotations.GwtIncompatible, .J2ktIncompatible, java.lang.ref.ReferenceQueue, .SoftReference, javax.annotation.CheckForNull

Soft reference with a finalizeReferent() method which a background thread invokes after the garbage collector reclaims the referent. This is a simpler alternative to using a ReferenceQueue.
Author
Bob Lee
Since
2.0

Constructor Summary

AccessConstructor and Description
protected
FinalizableSoftReference(T
to softly reference
referent
,
FinalizableReferenceQueue
that should finalize the referent
queue
)

Constructs a new finalizable soft reference.

Method Summary

Inherited from java.lang.ref.SoftReference:
get

Constructor Detail

FinalizableSoftReferenceback to summary
protected FinalizableSoftReference(T referent, FinalizableReferenceQueue queue)

Constructs a new finalizable soft reference.

Parameters
referent:T

to softly reference

queue:FinalizableReferenceQueue

that should finalize the referent