Class PhantomReference<T,A>

java.lang.Object
java.lang.ref.Reference<T>
java.lang.ref.PhantomReference<T>
org.jboss.modules.ref.PhantomReference<T,A>
Type Parameters:
T - the reference value type
A - the attachment type
All Implemented Interfaces:
Reference<T,A>

public class PhantomReference<T,A> extends PhantomReference<T> implements Reference<T,A>
A reapable phantom reference with an attachment. If a Reaper is given, then it will be used to asynchronously clean up the referent.
Author:
David M. Lloyd
See Also:
  • Constructor Details

    • PhantomReference

      public PhantomReference(T referent, A attachment, ReferenceQueue<? super T> q)
    • PhantomReference

      public PhantomReference(T referent, A attachment, Reaper<T,A> reaper)
  • Method Details