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 WeakReference
s.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()
Returns the hash for the reference.
|
ConcurrentReferenceHashMap.Reference<K,V> |
getNext()
Returns the next reference in the chain or
null |
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
private final ConcurrentReferenceHashMap.Reference<K,V> nextReference
public WeakEntryReference(ConcurrentReferenceHashMap.Entry<K,V> entry, int hash, 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>
public ConcurrentReferenceHashMap.Reference<K,V> getNext()
ConcurrentReferenceHashMap.Reference
null
getNext
in interface ConcurrentReferenceHashMap.Reference<K,V>
null
public void release()
ConcurrentReferenceHashMap.Reference
ReferenceManager#pollForPurge()
.release
in interface ConcurrentReferenceHashMap.Reference<K,V>