java.lang.Object
io.smallrye.common.ref.StrongReference<T,A>
- Type Parameters:
T- the reference value typeA- the attachment type
- All Implemented Interfaces:
Reference<T,A>
A strong reference with an attachment. Since strong references are always reachable, a reaper may not be used.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.smallrye.common.ref.Reference
Reference.Type -
Constructor Summary
ConstructorsConstructorDescriptionStrongReference(T referent) Construct a new instance.StrongReference(T referent, A attachment) Construct a new instance. -
Method Summary
-
Constructor Details
-
StrongReference
Construct a new instance.- Parameters:
referent- the referentattachment- the attachment
-
StrongReference
Construct a new instance.- Parameters:
referent- the referent
-
-
Method Details
-
get
Description copied from interface:ReferenceGet the value, ornullif the reference has been cleared. -
clear
public void clear()Description copied from interface:ReferenceClear the reference. -
getAttachment
Description copied from interface:ReferenceGet the attachment, if any.- Specified by:
getAttachmentin interfaceReference<T,A> - Returns:
- the attachment
-
getType
Description copied from interface:ReferenceGet the type of the reference. -
toString
-