
T - the reference value typeA - the attachment typepublic class WeakReference<T,A> extends WeakReference<T> implements Reference<T,A>
Reaper is given, then it will be used to asynchronously
clean up the referent.WeakReferenceReference.Type| Constructor and Description |
|---|
WeakReference(T referent) |
WeakReference(T referent,
A attachment) |
WeakReference(T referent,
A attachment,
Reaper<T,A> reaper) |
WeakReference(T referent,
A attachment,
ReferenceQueue<? super T> q) |
| Modifier and Type | Method and Description |
|---|---|
A |
getAttachment()
Get the attachment, if any.
|
Reaper<T,A> |
getReaper()
Get the associated reaper.
|
Reference.Type |
getType()
Get the type of the reference.
|
String |
toString() |
clear, enqueue, get, isEnqueuedpublic WeakReference(T referent)
public WeakReference(T referent, A attachment, ReferenceQueue<? super T> q)
public A getAttachment()
ReferencegetAttachment in interface Reference<T,A>public Reference.Type getType()
ReferenceCopyright © 2017 JBoss by Red Hat. All rights reserved.