private static final class ConcurrentReferenceHashMap.WeakEntryReference<K,V> extends java.lang.ref.WeakReference<ConcurrentReferenceHashMap.Entry<K,V>> implements ConcurrentReferenceHashMap.Reference<K,V>
ConcurrentReferenceHashMap.Reference
implementation for WeakReferences
.Modifier and Type | Field and Description |
---|---|
private int |
hash |
private ConcurrentReferenceHashMap.Reference<K,V> |
nextReference |
Constructor and Description |
---|
WeakEntryReference(ConcurrentReferenceHashMap.Entry<K,V> entry,
int hash,
ConcurrentReferenceHashMap.Reference<K,V> next,
java.lang.ref.ReferenceQueue<ConcurrentReferenceHashMap.Entry<K,V>> queue) |
Modifier and Type | Method and Description |
---|---|
int |
getHash()
Return the hash for the reference.
|
ConcurrentReferenceHashMap.Reference<K,V> |
getNext()
Return the next reference in the chain, or
null if none. |
void |
release()
Release this entry and ensure that it will be returned from
ReferenceManager#pollForPurge() . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
get
private final int hash
@Nullable private final ConcurrentReferenceHashMap.Reference<K,V> nextReference
public WeakEntryReference(ConcurrentReferenceHashMap.Entry<K,V> entry, int hash, @Nullable ConcurrentReferenceHashMap.Reference<K,V> next, java.lang.ref.ReferenceQueue<ConcurrentReferenceHashMap.Entry<K,V>> queue)
public int getHash()
ConcurrentReferenceHashMap.Reference
getHash
in interface ConcurrentReferenceHashMap.Reference<K,V>
@Nullable public ConcurrentReferenceHashMap.Reference<K,V> getNext()
ConcurrentReferenceHashMap.Reference
null
if none.getNext
in interface ConcurrentReferenceHashMap.Reference<K,V>
public void release()
ConcurrentReferenceHashMap.Reference
ReferenceManager#pollForPurge()
.release
in interface ConcurrentReferenceHashMap.Reference<K,V>