T
- the reference value typeA
- the attachment typeReference<T,A>
public 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.WeakReference
Reference.Type
Constructor | Description |
---|---|
WeakReference(T referent) |
|
WeakReference(T referent,
A attachment) |
|
WeakReference(T referent,
A attachment,
ReferenceQueue<? super T> q) |
|
WeakReference(T referent,
A attachment,
Reaper<T,A> reaper) |
Modifier and Type | Method | Description |
---|---|---|
A |
getAttachment() |
Get the attachment, if any.
|
Reaper<T,A> |
getReaper() |
|
Reference.Type |
getType() |
Get the type of the reference.
|
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
clear, enqueue, get, isEnqueued, reachabilityFence
public WeakReference(T referent)
public WeakReference(T referent, A attachment, ReferenceQueue<? super T> q)
public A getAttachment()
Reference
getAttachment
in interface Reference<T,A>
public Reference.Type getType()
Reference
Copyright © 2018 JBoss by Red Hat. All rights reserved.