Class SoftReference<T,A>

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

@Deprecated public class SoftReference<T,A> extends SoftReference<T> implements Reference<T,A>
Deprecated.
Use Cleaner or one of the reference types from a support library such as io.smallrye.common:smallrye-common-ref instead.
A reapable soft 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

    • SoftReference

      public SoftReference(T referent)
      Deprecated.
    • SoftReference

      public SoftReference(T referent, A attachment)
      Deprecated.
    • SoftReference

      public SoftReference(T referent, A attachment, ReferenceQueue<? super T> q)
      Deprecated.
    • SoftReference

      public SoftReference(T referent, A attachment, Reaper<T,A> reaper)
      Deprecated.
  • Method Details

    • getReaper

      public Reaper<T,A> getReaper()
      Deprecated.
    • getAttachment

      public A getAttachment()
      Deprecated.
      Description copied from interface: Reference
      Get the attachment, if any.
      Specified by:
      getAttachment in interface Reference<T,A>
      Returns:
      the attachment
    • getType

      public Reference.Type getType()
      Deprecated.
      Description copied from interface: Reference
      Get the type of the reference.
      Specified by:
      getType in interface Reference<T,A>
      Returns:
      the type
    • toString

      public String toString()
      Deprecated.
      Overrides:
      toString in class Object