Class StrongReference<T,A>

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

@Deprecated(forRemoval=true) public class StrongReference<T,A> extends Object implements Reference<T,A>
Deprecated, for removal: This API element is subject to removal in a future version.
Use StrongReference instead.
A strong reference with an attachment. Since strong references are always reachable, a reaper may not be used.
Author:
David M. Lloyd
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.wildfly.common.ref.Reference

    Reference.Type
  • Constructor Summary

    Constructors
    Constructor
    Description
    StrongReference(T referent)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Construct a new instance.
    StrongReference(T referent, A attachment)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Construct a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Clear the reference.
    get()
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the value, or null if the reference has been cleared.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the attachment, if any.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Get the type of the reference.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • StrongReference

      public StrongReference(T referent, A attachment)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct a new instance.
      Parameters:
      referent - the referent
      attachment - the attachment
    • StrongReference

      public StrongReference(T referent)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Construct a new instance.
      Parameters:
      referent - the referent
  • Method Details

    • get

      public T get()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Reference
      Get the value, or null if the reference has been cleared.
      Specified by:
      get in interface Reference<T,A>
      Returns:
      the value
    • clear

      public void clear()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: Reference
      Clear the reference.
      Specified by:
      clear in interface Reference<T,A>
    • getAttachment

      public A getAttachment()
      Deprecated, for removal: This API element is subject to removal in a future version.
      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, for removal: This API element is subject to removal in a future version.
      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, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object